Files
reverse-engineering-anything/docs/development
morluto 6bcec126c7 test(adb): link stub executables to one launched dispatcher (#15698)
* test(adb): link stub executables to one launched dispatcher

macOS checks every newly written executable on its first launch, one file
at a time for the whole host (about 150 ms each; 50 fresh stubs launched
together took 9 s). The ADB tests wrote a fresh fake adb (and Node.js tool
shims) per test, so under parallel load the first launch waited behind
every other test's stubs inside the provider's 10 s adb version probe
deadline or the test's own deadline.

writeShellStub hard-links each stub to one dispatcher the test process has
already launched; the dispatcher sources the stub's script with the stub's
own $0 and arguments. AdbProvider.test.ts drops from 38 s to 12 s alone.

* test(adb): remove the stub dispatcher at worker teardown

Forked Vitest workers skip process exit hooks, so the dispatcher
directory leaked. The test runner now removes it through the worker
cleanup it already uses for the process ownership host.
2026-12-02 00:28:46 +00:00
..