Files
OrcaSlicer/tests
Lam Wei Lun 397a8d9b1a Fix updater review blockers: URL allowlist, install lock, nightly identity
is_release_download_url was a prefix test, so a URL with ../ segments
passed it and curl collapsed them into another repository's path. It now
takes the asset name and accepts only <prefix><tag>/<asset_name> made of
plain characters, and the downloader sets CURLOPT_PATH_AS_IS.

The install lock took over a stale pid file with a read, a remove and a
create, so two takers could both win, and the file existed empty before
the pid was written. It now holds flock/LockFileEx on an open handle for
the life of the process; the OS drops it when the holder exits.

On Windows the helper waited only for the parent process. A second
OrcaSlicer running from the install folder kept files locked, and the
silent NSIS installer uninstalled first and then failed. The helper now
waits up to 30 s for such processes and refuses before anything changes.

A nightly installed by hand has no recorded digest and was compared with
the release's updated_at, which follows the last asset upload, so it was
offered itself on every check. The release now has to be more than six
hours newer than the build.

The update dialog was destroyed twice when the updater failed to start:
it lived on the stack while the main frame, its parent, was deleted.
It is now scoped before the install starts.

The install record names the install it belongs to, and only that copy
consumes it. It is read first and deleted after the install lock is
taken, so a held lock no longer leaves the download in the cache.

On macOS a user who cannot write the target's parent folder had no way
to stage the new bundle. It is staged in the cache and copied in by the
single administrator step.
2026-11-12 18:17:54 +08:00
..
2025-12-08 22:42:11 +08:00

OrcaSlicer tests

Building, running and writing tests is documented on the wiki, under How to Test.

Two files here rather than there, because coding agents only read what is in the repository:

  • AGENTS.md is the same guidance in short form, and is what an agent working under tests/ picks up.
  • CATCH2.md is the Catch2 reference, including the mistakes that break a test at runtime.