mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-27 06:43:19 +08:00
A run that a signal ends has a null exit code, so the runner recorded a pass when Node and the executable ended by different signals, or when one ended by a signal and the other with an exit code compared as null. The verdict now compares both the exit code and the signal (verdict.mjs), and records Node's signal in nodeExit as it does for the executable. A relative --node path also made the minimal lane's fixtures symlink relative to the copied tree, where it does not resolve. The checkout path is now resolved first. tests/harness/node-parallel-runner.test.ts covers both: the termination comparison, and a relative --node path whose fixtures resolve from the minimal tree.
Node test/parallel files
run.mjs builds files from a Node.js checkout's test/parallel with scriptc, runs each executable in that directory, and compares its exit status with Node's. It records a verdict per file: pass (the same exit code, or the same terminating signal), fail (a different exit code or signal), or refused (the build failed), with the first error line.
git clone --depth 1 --branch v24.22.0 https://github.com/nodejs/node /path/to/node
node tests/node-parallel/run.mjs --node /path/to/node --pattern '^test-(url-|whatwg-url-|querystring)'
Options:
--node: a Node.js checkout, or itstestdirectory. Use the version in.node-version.--pattern: a regular expression over file names intest/parallel.--common:minimal(the default) ornode.minimalcopies the selected files into<out>/tree/test/paralleland usescommon/index.cjsandcommon/wpt.cjsfrom this directory astest/common/index.jsandtest/common/wpt.js, with the checkout'stest/fixturesandtest/common/fixtures.js. The minimal common has the helpers these files use (mustCall,mustNotCall,skip,expectWarning,invalidArgTypeHelper,spawnPromisified,hasIntl,isWindows, ...) with Node's semantics, so a verdict measures the module under test rather than Node's fulltest/common.nodebuilds the files in place against Node's owntest/common.
--out: where executables and results go (defaultnode_modules/.cache/scriptc-node-parallel).--cli: the scriptc CLI entry (defaultpackages/cli/dist/main.js).--jobs: concurrent files (default 4).
Node runs each file with its // Flags: line. Results are written to <out>/results.json and <out>/results.md.
Before a lane relies on the minimal common, run its files under Node in <out>/tree/test/parallel: they should all pass there.