@convesoft/nx-rust 0.0.0 → 1.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-APACHE +201 -0
- package/LICENSE-MIT +21 -0
- package/README.md +47 -1
- package/executors.json +35 -0
- package/generators.json +19 -0
- package/package.json +17 -4
- package/src/cargo/build-settings.d.ts +54 -0
- package/src/cargo/build-settings.js +93 -0
- package/src/cargo/build-settings.js.map +1 -0
- package/src/cargo/configured-runner.d.ts +36 -0
- package/src/cargo/configured-runner.js +99 -0
- package/src/cargo/configured-runner.js.map +1 -0
- package/src/cargo/configured-tools.d.ts +35 -0
- package/src/cargo/configured-tools.js +46 -0
- package/src/cargo/configured-tools.js.map +1 -0
- package/src/cargo/dep-info-basedir.d.ts +18 -0
- package/src/cargo/dep-info-basedir.js +38 -0
- package/src/cargo/dep-info-basedir.js.map +1 -0
- package/src/cargo/directories.d.ts +40 -0
- package/src/cargo/directories.js +89 -0
- package/src/cargo/directories.js.map +1 -0
- package/src/cargo/host-triple.d.ts +7 -0
- package/src/cargo/host-triple.js +21 -0
- package/src/cargo/host-triple.js.map +1 -0
- package/src/cargo/lockfile.d.ts +63 -0
- package/src/cargo/lockfile.js +157 -0
- package/src/cargo/lockfile.js.map +1 -0
- package/src/cargo/metadata.d.ts +112 -0
- package/src/cargo/metadata.js +37 -0
- package/src/cargo/metadata.js.map +1 -0
- package/src/cargo/package-specs.d.ts +54 -0
- package/src/cargo/package-specs.js +109 -0
- package/src/cargo/package-specs.js.map +1 -0
- package/src/cargo/paths-crates.d.ts +27 -0
- package/src/cargo/paths-crates.js +69 -0
- package/src/cargo/paths-crates.js.map +1 -0
- package/src/cargo/print-artifact-folders.d.ts +1 -0
- package/src/cargo/print-artifact-folders.js +58 -0
- package/src/cargo/print-artifact-folders.js.map +1 -0
- package/src/cargo/redirections.d.ts +87 -0
- package/src/cargo/redirections.js +195 -0
- package/src/cargo/redirections.js.map +1 -0
- package/src/cargo/run-cargo.d.ts +31 -0
- package/src/cargo/run-cargo.js +75 -0
- package/src/cargo/run-cargo.js.map +1 -0
- package/src/cargo/target-triples.d.ts +98 -0
- package/src/cargo/target-triples.js +265 -0
- package/src/cargo/target-triples.js.map +1 -0
- package/src/cargo/version-req.d.ts +12 -0
- package/src/cargo/version-req.js +122 -0
- package/src/cargo/version-req.js.map +1 -0
- package/src/compatibility/cargo-version.d.ts +43 -0
- package/src/compatibility/cargo-version.js +83 -0
- package/src/compatibility/cargo-version.js.map +1 -0
- package/src/compatibility/nx-bridge.d.ts +312 -0
- package/src/compatibility/nx-bridge.js +407 -0
- package/src/compatibility/nx-bridge.js.map +1 -0
- package/src/compatibility/nx-version.d.ts +104 -0
- package/src/compatibility/nx-version.js +272 -0
- package/src/compatibility/nx-version.js.map +1 -0
- package/src/executors/affected-inputs.d.ts +29 -0
- package/src/executors/affected-inputs.js +259 -0
- package/src/executors/affected-inputs.js.map +1 -0
- package/src/executors/affected-run.d.ts +54 -0
- package/src/executors/affected-run.js +394 -0
- package/src/executors/affected-run.js.map +1 -0
- package/src/executors/affected.d.ts +239 -0
- package/src/executors/affected.js +589 -0
- package/src/executors/affected.js.map +1 -0
- package/src/executors/baseline-context.d.ts +85 -0
- package/src/executors/baseline-context.js +227 -0
- package/src/executors/baseline-context.js.map +1 -0
- package/src/executors/baseline.d.ts +123 -0
- package/src/executors/baseline.js +356 -0
- package/src/executors/baseline.js.map +1 -0
- package/src/executors/batch.d.ts +75 -0
- package/src/executors/batch.js +434 -0
- package/src/executors/batch.js.map +1 -0
- package/src/executors/build-records.d.ts +110 -0
- package/src/executors/build-records.js +267 -0
- package/src/executors/build-records.js.map +1 -0
- package/src/executors/cargo/executor.d.ts +28 -0
- package/src/executors/cargo/executor.js +58 -0
- package/src/executors/cargo/executor.js.map +1 -0
- package/src/executors/cargo/schema.json +54 -0
- package/src/executors/cargo-invocation.d.ts +81 -0
- package/src/executors/cargo-invocation.js +109 -0
- package/src/executors/cargo-invocation.js.map +1 -0
- package/src/executors/cargo-output.d.ts +212 -0
- package/src/executors/cargo-output.js +646 -0
- package/src/executors/cargo-output.js.map +1 -0
- package/src/executors/command.d.ts +318 -0
- package/src/executors/command.js +517 -0
- package/src/executors/command.js.map +1 -0
- package/src/executors/coverage-baseline.d.ts +23 -0
- package/src/executors/coverage-baseline.js +284 -0
- package/src/executors/coverage-baseline.js.map +1 -0
- package/src/executors/declared-options.d.ts +21 -0
- package/src/executors/declared-options.js +58 -0
- package/src/executors/declared-options.js.map +1 -0
- package/src/executors/digests.d.ts +94 -0
- package/src/executors/digests.js +190 -0
- package/src/executors/digests.js.map +1 -0
- package/src/executors/dotenv-check.d.ts +79 -0
- package/src/executors/dotenv-check.js +553 -0
- package/src/executors/dotenv-check.js.map +1 -0
- package/src/executors/group-invocations.d.ts +80 -0
- package/src/executors/group-invocations.js +253 -0
- package/src/executors/group-invocations.js.map +1 -0
- package/src/executors/group-run.d.ts +114 -0
- package/src/executors/group-run.js +591 -0
- package/src/executors/group-run.js.map +1 -0
- package/src/executors/groups.d.ts +113 -0
- package/src/executors/groups.js +285 -0
- package/src/executors/groups.js.map +1 -0
- package/src/executors/input-check.d.ts +52 -0
- package/src/executors/input-check.js +271 -0
- package/src/executors/input-check.js.map +1 -0
- package/src/executors/kept-files.d.ts +98 -0
- package/src/executors/kept-files.js +341 -0
- package/src/executors/kept-files.js.map +1 -0
- package/src/executors/lockfile/executor.d.ts +16 -0
- package/src/executors/lockfile/executor.js +37 -0
- package/src/executors/lockfile/executor.js.map +1 -0
- package/src/executors/lockfile/schema.json +50 -0
- package/src/executors/napi-build.d.ts +73 -0
- package/src/executors/napi-build.js +420 -0
- package/src/executors/napi-build.js.map +1 -0
- package/src/executors/nextest.d.ts +185 -0
- package/src/executors/nextest.js +498 -0
- package/src/executors/nextest.js.map +1 -0
- package/src/executors/nx-command.d.ts +95 -0
- package/src/executors/nx-command.js +205 -0
- package/src/executors/nx-command.js.map +1 -0
- package/src/executors/nx-task-files.d.ts +82 -0
- package/src/executors/nx-task-files.js +156 -0
- package/src/executors/nx-task-files.js.map +1 -0
- package/src/executors/print-test-mode.d.ts +1 -0
- package/src/executors/print-test-mode.js +25 -0
- package/src/executors/print-test-mode.js.map +1 -0
- package/src/executors/release-publish/executor.d.ts +24 -0
- package/src/executors/release-publish/executor.js +165 -0
- package/src/executors/release-publish/executor.js.map +1 -0
- package/src/executors/release-publish/schema.json +30 -0
- package/src/executors/run/executor.d.ts +12 -0
- package/src/executors/run/executor.js +27 -0
- package/src/executors/run/executor.js.map +1 -0
- package/src/executors/run/schema.json +45 -0
- package/src/executors/runner-script.d.ts +12 -0
- package/src/executors/runner-script.js +22 -0
- package/src/executors/runner-script.js.map +1 -0
- package/src/executors/runtime-input-check.d.ts +24 -0
- package/src/executors/runtime-input-check.js +87 -0
- package/src/executors/runtime-input-check.js.map +1 -0
- package/src/executors/shared-artifacts.d.ts +44 -0
- package/src/executors/shared-artifacts.js +132 -0
- package/src/executors/shared-artifacts.js.map +1 -0
- package/src/executors/split-words.d.ts +24 -0
- package/src/executors/split-words.js +111 -0
- package/src/executors/split-words.js.map +1 -0
- package/src/executors/stage.d.ts +163 -0
- package/src/executors/stage.js +526 -0
- package/src/executors/stage.js.map +1 -0
- package/src/executors/staged-run.d.ts +24 -0
- package/src/executors/staged-run.js +110 -0
- package/src/executors/staged-run.js.map +1 -0
- package/src/executors/task-env.d.ts +271 -0
- package/src/executors/task-env.js +494 -0
- package/src/executors/task-env.js.map +1 -0
- package/src/executors/task-execution.d.ts +61 -0
- package/src/executors/task-execution.js +122 -0
- package/src/executors/task-execution.js.map +1 -0
- package/src/executors/task-guards.d.ts +112 -0
- package/src/executors/task-guards.js +430 -0
- package/src/executors/task-guards.js.map +1 -0
- package/src/executors/task-options.d.ts +114 -0
- package/src/executors/task-options.js +258 -0
- package/src/executors/task-options.js.map +1 -0
- package/src/executors/task.d.ts +166 -0
- package/src/executors/task.js +520 -0
- package/src/executors/task.js.map +1 -0
- package/src/executors/test-mode.d.ts +182 -0
- package/src/executors/test-mode.js +391 -0
- package/src/executors/test-mode.js.map +1 -0
- package/src/executors/test-runner.d.ts +44 -0
- package/src/executors/test-runner.js +159 -0
- package/src/executors/test-runner.js.map +1 -0
- package/src/executors/test-steps.d.ts +109 -0
- package/src/executors/test-steps.js +535 -0
- package/src/executors/test-steps.js.map +1 -0
- package/src/executors/wasm-build.d.ts +56 -0
- package/src/executors/wasm-build.js +216 -0
- package/src/executors/wasm-build.js.map +1 -0
- package/src/generators/crate/binary.schema.json +28 -0
- package/src/generators/crate/crate.d.ts +24 -0
- package/src/generators/crate/crate.js +108 -0
- package/src/generators/crate/crate.js.map +1 -0
- package/src/generators/crate/enclosing-workspace.d.ts +25 -0
- package/src/generators/crate/enclosing-workspace.js +58 -0
- package/src/generators/crate/enclosing-workspace.js.map +1 -0
- package/src/generators/crate/library.schema.json +28 -0
- package/src/generators/init/graph-check.d.ts +81 -0
- package/src/generators/init/graph-check.js +299 -0
- package/src/generators/init/graph-check.js.map +1 -0
- package/src/generators/init/init.d.ts +23 -0
- package/src/generators/init/init.js +113 -0
- package/src/generators/init/init.js.map +1 -0
- package/src/generators/init/report.d.ts +19 -0
- package/src/generators/init/report.js +93 -0
- package/src/generators/init/report.js.map +1 -0
- package/src/generators/init/schema.json +9 -0
- package/src/graph/artifact-kinds.d.ts +29 -0
- package/src/graph/artifact-kinds.js +50 -0
- package/src/graph/artifact-kinds.js.map +1 -0
- package/src/graph/artifact-names.d.ts +97 -0
- package/src/graph/artifact-names.js +276 -0
- package/src/graph/artifact-names.js.map +1 -0
- package/src/graph/build-records.d.ts +74 -0
- package/src/graph/build-records.js +104 -0
- package/src/graph/build-records.js.map +1 -0
- package/src/graph/caching.d.ts +148 -0
- package/src/graph/caching.js +676 -0
- package/src/graph/caching.js.map +1 -0
- package/src/graph/collisions.d.ts +106 -0
- package/src/graph/collisions.js +156 -0
- package/src/graph/collisions.js.map +1 -0
- package/src/graph/computation-reports.d.ts +89 -0
- package/src/graph/computation-reports.js +216 -0
- package/src/graph/computation-reports.js.map +1 -0
- package/src/graph/declared-files.d.ts +190 -0
- package/src/graph/declared-files.js +600 -0
- package/src/graph/declared-files.js.map +1 -0
- package/src/graph/discovery.d.ts +175 -0
- package/src/graph/discovery.js +656 -0
- package/src/graph/discovery.js.map +1 -0
- package/src/graph/edges.d.ts +25 -0
- package/src/graph/edges.js +94 -0
- package/src/graph/edges.js.map +1 -0
- package/src/graph/entries.d.ts +83 -0
- package/src/graph/entries.js +259 -0
- package/src/graph/entries.js.map +1 -0
- package/src/graph/inputs.d.ts +420 -0
- package/src/graph/inputs.js +746 -0
- package/src/graph/inputs.js.map +1 -0
- package/src/graph/lockfile-task.d.ts +74 -0
- package/src/graph/lockfile-task.js +105 -0
- package/src/graph/lockfile-task.js.map +1 -0
- package/src/graph/names.d.ts +41 -0
- package/src/graph/names.js +34 -0
- package/src/graph/names.js.map +1 -0
- package/src/graph/napi.d.ts +107 -0
- package/src/graph/napi.js +206 -0
- package/src/graph/napi.js.map +1 -0
- package/src/graph/nx-glob.d.ts +36 -0
- package/src/graph/nx-glob.js +152 -0
- package/src/graph/nx-glob.js.map +1 -0
- package/src/graph/nx-internals.d.ts +57 -0
- package/src/graph/nx-internals.js +128 -0
- package/src/graph/nx-internals.js.map +1 -0
- package/src/graph/options.d.ts +32 -0
- package/src/graph/options.js +80 -0
- package/src/graph/options.js.map +1 -0
- package/src/graph/outputs.d.ts +75 -0
- package/src/graph/outputs.js +140 -0
- package/src/graph/outputs.js.map +1 -0
- package/src/graph/path-dependencies.d.ts +122 -0
- package/src/graph/path-dependencies.js +459 -0
- package/src/graph/path-dependencies.js.map +1 -0
- package/src/graph/plugin-package.d.ts +36 -0
- package/src/graph/plugin-package.js +132 -0
- package/src/graph/plugin-package.js.map +1 -0
- package/src/graph/plugin-version.d.ts +20 -0
- package/src/graph/plugin-version.js +153 -0
- package/src/graph/plugin-version.js.map +1 -0
- package/src/graph/projects.d.ts +141 -0
- package/src/graph/projects.js +182 -0
- package/src/graph/projects.js.map +1 -0
- package/src/graph/reached-projects.d.ts +46 -0
- package/src/graph/reached-projects.js +102 -0
- package/src/graph/reached-projects.js.map +1 -0
- package/src/graph/real-path.d.ts +47 -0
- package/src/graph/real-path.js +113 -0
- package/src/graph/real-path.js.map +1 -0
- package/src/graph/redirected-uses.d.ts +98 -0
- package/src/graph/redirected-uses.js +434 -0
- package/src/graph/redirected-uses.js.map +1 -0
- package/src/graph/registration.d.ts +121 -0
- package/src/graph/registration.js +233 -0
- package/src/graph/registration.js.map +1 -0
- package/src/graph/script-input.d.ts +46 -0
- package/src/graph/script-input.js +65 -0
- package/src/graph/script-input.js.map +1 -0
- package/src/graph/settings.d.ts +178 -0
- package/src/graph/settings.js +479 -0
- package/src/graph/settings.js.map +1 -0
- package/src/graph/target-defaults-causes.d.ts +33 -0
- package/src/graph/target-defaults-causes.js +202 -0
- package/src/graph/target-defaults-causes.js.map +1 -0
- package/src/graph/target-defaults-layers.d.ts +186 -0
- package/src/graph/target-defaults-layers.js +420 -0
- package/src/graph/target-defaults-layers.js.map +1 -0
- package/src/graph/target-defaults-meaning.d.ts +95 -0
- package/src/graph/target-defaults-meaning.js +292 -0
- package/src/graph/target-defaults-meaning.js.map +1 -0
- package/src/graph/target-defaults-report.d.ts +77 -0
- package/src/graph/target-defaults-report.js +242 -0
- package/src/graph/target-defaults-report.js.map +1 -0
- package/src/graph/target-defaults.d.ts +79 -0
- package/src/graph/target-defaults.js +425 -0
- package/src/graph/target-defaults.js.map +1 -0
- package/src/graph/target-fields.d.ts +16 -0
- package/src/graph/target-fields.js +134 -0
- package/src/graph/target-fields.js.map +1 -0
- package/src/graph/target-tables.d.ts +45 -0
- package/src/graph/target-tables.js +299 -0
- package/src/graph/target-tables.js.map +1 -0
- package/src/graph/targets.d.ts +367 -0
- package/src/graph/targets.js +404 -0
- package/src/graph/targets.js.map +1 -0
- package/src/graph/unification.d.ts +141 -0
- package/src/graph/unification.js +459 -0
- package/src/graph/unification.js.map +1 -0
- package/src/graph/unignored-directories.d.ts +25 -0
- package/src/graph/unignored-directories.js +89 -0
- package/src/graph/unignored-directories.js.map +1 -0
- package/src/graph/visibility.d.ts +17 -0
- package/src/graph/visibility.js +67 -0
- package/src/graph/visibility.js.map +1 -0
- package/src/graph/warnings.d.ts +38 -0
- package/src/graph/warnings.js +77 -0
- package/src/graph/warnings.js.map +1 -0
- package/src/graph/wasm.d.ts +56 -0
- package/src/graph/wasm.js +77 -0
- package/src/graph/wasm.js.map +1 -0
- package/src/index.d.ts +68 -0
- package/src/index.js +109 -0
- package/src/index.js.map +1 -0
- package/src/release/manifests.d.ts +95 -0
- package/src/release/manifests.js +164 -0
- package/src/release/manifests.js.map +1 -0
- package/src/release/places.d.ts +127 -0
- package/src/release/places.js +368 -0
- package/src/release/places.js.map +1 -0
- package/src/release/publish-cargo.d.ts +177 -0
- package/src/release/publish-cargo.js +351 -0
- package/src/release/publish-cargo.js.map +1 -0
- package/src/release/publish-crates.d.ts +124 -0
- package/src/release/publish-crates.js +242 -0
- package/src/release/publish-crates.js.map +1 -0
- package/src/release/publish-environments.d.ts +50 -0
- package/src/release/publish-environments.js +284 -0
- package/src/release/publish-environments.js.map +1 -0
- package/src/release/publish-messages.d.ts +66 -0
- package/src/release/publish-messages.js +273 -0
- package/src/release/publish-messages.js.map +1 -0
- package/src/release/publish-registry.d.ts +27 -0
- package/src/release/publish-registry.js +135 -0
- package/src/release/publish-registry.js.map +1 -0
- package/src/release/publish-settings.d.ts +26 -0
- package/src/release/publish-settings.js +56 -0
- package/src/release/publish-settings.js.map +1 -0
- package/src/release/publish.d.ts +59 -0
- package/src/release/publish.js +620 -0
- package/src/release/publish.js.map +1 -0
- package/src/release/repository.d.ts +73 -0
- package/src/release/repository.js +219 -0
- package/src/release/repository.js.map +1 -0
- package/src/release/requirements.d.ts +34 -0
- package/src/release/requirements.js +30 -0
- package/src/release/requirements.js.map +1 -0
- package/src/release/toml-edit.d.ts +67 -0
- package/src/release/toml-edit.js +453 -0
- package/src/release/toml-edit.js.map +1 -0
- package/src/release/version-actions.d.ts +133 -0
- package/src/release/version-actions.js +474 -0
- package/src/release/version-actions.js.map +1 -0
- package/src/release/version-checks.d.ts +21 -0
- package/src/release/version-checks.js +151 -0
- package/src/release/version-checks.js.map +1 -0
- package/src/release/version-lockfiles.d.ts +61 -0
- package/src/release/version-lockfiles.js +222 -0
- package/src/release/version-lockfiles.js.map +1 -0
- package/src/tools/napi-cli.d.ts +70 -0
- package/src/tools/napi-cli.js +63 -0
- package/src/tools/napi-cli.js.map +1 -0
- package/src/tools/optional-tools.d.ts +121 -0
- package/src/tools/optional-tools.js +303 -0
- package/src/tools/optional-tools.js.map +1 -0
- package/src/tools/print-napi-cli.d.ts +1 -0
- package/src/tools/print-napi-cli.js +24 -0
- package/src/tools/print-napi-cli.js.map +1 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.processEnding = exports.runnerFailureStatus = exports.recordVariable = exports.packagesVariable = void 0;
|
|
4
|
+
exports.superviseChild = superviseChild;
|
|
5
|
+
/**
|
|
6
|
+
* The selecting runner of the test binaries' step under `workspace-build`
|
|
7
|
+
* (`DES-TEST-RUN`, "The selecting runner" and "The runner program"). Cargo
|
|
8
|
+
* starts it, as `target.<host>.runner`, for every test executable of the
|
|
9
|
+
* workspace, with the program and its arguments as its own arguments, in
|
|
10
|
+
* the package's folder and with the package's name in `CARGO_PKG_NAME`. The
|
|
11
|
+
* plugin gives it the group's packages in `NX_RUST_TEST_PACKAGES`, as
|
|
12
|
+
* `:a:b:`, and the folder of the step's record in `NX_RUST_TEST_RECORD`.
|
|
13
|
+
*
|
|
14
|
+
* For each start it:
|
|
15
|
+
*
|
|
16
|
+
* 1. records the start before anything else, in a file of its own that it
|
|
17
|
+
* creates exclusively in the record folder, which it creates where it is
|
|
18
|
+
* missing, naming the package and the program, and exits with 125, having
|
|
19
|
+
* started nothing, where it cannot;
|
|
20
|
+
* 2. adds an error entry, says why on standard error and exits with 125
|
|
21
|
+
* where `CARGO_PKG_NAME` is missing or empty, no program is given, or the
|
|
22
|
+
* list of packages is missing or not of its form;
|
|
23
|
+
* 3. adds a skip entry and exits with 0 for a package that is not in the
|
|
24
|
+
* list, compared by exact name;
|
|
25
|
+
* 4. otherwise starts the program by its path, with its arguments and with
|
|
26
|
+
* the environment that cargo gave the runner less the runner's own two
|
|
27
|
+
* variables, and once the program has ended adds an end entry with its
|
|
28
|
+
* exit status or the signal that ended it, and ends the same way; where
|
|
29
|
+
* it cannot add the end entry, it exits with 125.
|
|
30
|
+
*
|
|
31
|
+
* The script is started with the Node that runs the batch implementation,
|
|
32
|
+
* by absolute paths, and imports only Node's own modules. It starts nothing
|
|
33
|
+
* through `PATH`.
|
|
34
|
+
*/
|
|
35
|
+
// @mara implements DES-TEST-RUN
|
|
36
|
+
const node_child_process_1 = require("node:child_process");
|
|
37
|
+
const node_fs_1 = require("node:fs");
|
|
38
|
+
const node_path_1 = require("node:path");
|
|
39
|
+
/** The variable that names the group's packages, as `:a:b:`. */
|
|
40
|
+
exports.packagesVariable = "NX_RUST_TEST_PACKAGES";
|
|
41
|
+
/** The variable that names the folder of the step's record. */
|
|
42
|
+
exports.recordVariable = "NX_RUST_TEST_RECORD";
|
|
43
|
+
/** The status with which the runner ends where it cannot do its part. */
|
|
44
|
+
exports.runnerFailureStatus = 125;
|
|
45
|
+
function main() {
|
|
46
|
+
var _a;
|
|
47
|
+
const program = process.argv[2];
|
|
48
|
+
const args = process.argv.slice(3);
|
|
49
|
+
const pkg = (_a = process.env.CARGO_PKG_NAME) !== null && _a !== void 0 ? _a : "";
|
|
50
|
+
const folder = process.env[exports.recordVariable];
|
|
51
|
+
// 1. The start, before anything else.
|
|
52
|
+
let fd;
|
|
53
|
+
try {
|
|
54
|
+
if (folder === undefined || folder === "") {
|
|
55
|
+
throw new Error(`${exports.recordVariable} is not set`);
|
|
56
|
+
}
|
|
57
|
+
// The plugin creates the folder for its step; a command that a verbose
|
|
58
|
+
// run printed and that someone runs by hand finds it gone.
|
|
59
|
+
(0, node_fs_1.mkdirSync)(folder, { recursive: true });
|
|
60
|
+
fd = (0, node_fs_1.openSync)((0, node_path_1.join)(folder, `${process.pid}-${process.hrtime.bigint()}-${Math.random().toString(36).slice(2)}.jsonl`), "wx");
|
|
61
|
+
append(fd, { start: { package: pkg, program: program !== null && program !== void 0 ? program : "" } });
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
process.stderr.write(`@convesoft/nx-rust's test runner could not record the start of ${program !== null && program !== void 0 ? program : "a test executable"}, so it starts nothing: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
65
|
+
process.exit(exports.runnerFailureStatus);
|
|
66
|
+
}
|
|
67
|
+
// 2. Fail closed on what cargo or the plugin should have given.
|
|
68
|
+
const packages = process.env[exports.packagesVariable];
|
|
69
|
+
const problem = pkg === ""
|
|
70
|
+
? "CARGO_PKG_NAME is missing or empty"
|
|
71
|
+
: program === undefined || program === ""
|
|
72
|
+
? "cargo gave it no program to run"
|
|
73
|
+
: packages === undefined
|
|
74
|
+
? `${exports.packagesVariable} is not set`
|
|
75
|
+
: !/^:(?:[^:\s]+:)+$/.test(packages)
|
|
76
|
+
? `${exports.packagesVariable} is ${JSON.stringify(packages)}, which is not of the form :a:b:`
|
|
77
|
+
: undefined;
|
|
78
|
+
if (problem !== undefined) {
|
|
79
|
+
process.stderr.write(`@convesoft/nx-rust's test runner starts nothing for ${program !== null && program !== void 0 ? program : "a test executable"}: ${problem}.\n`);
|
|
80
|
+
finish(fd, { error: problem });
|
|
81
|
+
process.exit(exports.runnerFailureStatus);
|
|
82
|
+
}
|
|
83
|
+
// 3. Another package's test executable.
|
|
84
|
+
if (!packages.includes(`:${pkg}:`)) {
|
|
85
|
+
finish(fd, { skip: true });
|
|
86
|
+
process.exit(0);
|
|
87
|
+
}
|
|
88
|
+
// 4. A test executable of the group: cargo's environment, less the runner's own variables.
|
|
89
|
+
const env = Object.assign({}, process.env);
|
|
90
|
+
delete env[exports.packagesVariable];
|
|
91
|
+
delete env[exports.recordVariable];
|
|
92
|
+
const child = (0, node_child_process_1.spawn)((0, node_path_1.resolve)(program), args, { env, stdio: "inherit" });
|
|
93
|
+
superviseChild(child, fd, program);
|
|
94
|
+
}
|
|
95
|
+
/** The runner's own ending: the child's signal raised on the runner's own process. */
|
|
96
|
+
exports.processEnding = {
|
|
97
|
+
raise: (signal) => {
|
|
98
|
+
process.kill(process.pid, signal);
|
|
99
|
+
},
|
|
100
|
+
exit: (status) => process.exit(status),
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Forwards the signals that end a run to the started program and, once it
|
|
104
|
+
* has ended, adds the end entry to the record file `fd` and ends the runner
|
|
105
|
+
* the same way, through `ending`. Tests pass an ending of their own, so
|
|
106
|
+
* that a program ended by a signal that dumps core does not make the test
|
|
107
|
+
* process raise it on itself.
|
|
108
|
+
*/
|
|
109
|
+
function superviseChild(child, fd, program, ending = exports.processEnding) {
|
|
110
|
+
const signals = ["SIGINT", "SIGTERM", "SIGHUP", "SIGQUIT"];
|
|
111
|
+
const forward = (signal) => child.kill(signal);
|
|
112
|
+
for (const signal of signals) {
|
|
113
|
+
process.on(signal, forward);
|
|
114
|
+
}
|
|
115
|
+
child.on("error", (error) => {
|
|
116
|
+
process.stderr.write(`@convesoft/nx-rust's test runner could not start ${program}: ${error.message}\n`);
|
|
117
|
+
// The program did not run: the record ends with the status that a
|
|
118
|
+
// shell gives a command it cannot start, so that its task fails.
|
|
119
|
+
finish(fd, { end: { status: 127 } });
|
|
120
|
+
ending.exit(127);
|
|
121
|
+
});
|
|
122
|
+
child.on("exit", (code, signal) => {
|
|
123
|
+
for (const name of signals) {
|
|
124
|
+
process.off(name, forward);
|
|
125
|
+
}
|
|
126
|
+
if (signal !== null) {
|
|
127
|
+
finish(fd, { end: { signal } });
|
|
128
|
+
ending.raise(signal);
|
|
129
|
+
// A signal that Node ignores, such as SIGPIPE, does not end the
|
|
130
|
+
// runner: it then fails, so that cargo does not see a success.
|
|
131
|
+
setTimeout(() => ending.exit(exports.runnerFailureStatus), 1000);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const status = code !== null && code !== void 0 ? code : exports.runnerFailureStatus;
|
|
135
|
+
finish(fd, { end: { status } });
|
|
136
|
+
ending.exit(status);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
// Adds an entry to the record file as one line.
|
|
140
|
+
function append(fd, entry) {
|
|
141
|
+
(0, node_fs_1.writeSync)(fd, `${JSON.stringify(entry)}\n`);
|
|
142
|
+
}
|
|
143
|
+
// Adds the last entry and closes the record file; where that fails, the
|
|
144
|
+
// runner exits with 125, so that the start stays without its end.
|
|
145
|
+
function finish(fd, entry) {
|
|
146
|
+
var _a;
|
|
147
|
+
try {
|
|
148
|
+
append(fd, entry);
|
|
149
|
+
(0, node_fs_1.closeSync)(fd);
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
process.stderr.write(`@convesoft/nx-rust's test runner could not record how ${(_a = process.argv[2]) !== null && _a !== void 0 ? _a : "a test executable"} ended: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
153
|
+
process.exit(exports.runnerFailureStatus);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (require.main === module) {
|
|
157
|
+
main();
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=test-runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-runner.js","sourceRoot":"","sources":["../../../../nx-rust/src/executors/test-runner.ts"],"names":[],"mappings":";;;AA4IA,wCAoCC;AAhLD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,gCAAgC;AAChC,2DAA2C;AAC3C,qCAAoE;AACpE,yCAA0C;AAE1C,gEAAgE;AACnD,QAAA,gBAAgB,GAAG,uBAAuB,CAAC;AACxD,+DAA+D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AAE,EAAE,KAAK,CAAC,CAAC;QAClB,IAAA,mBAAS,EAAC,EAAE,CAAC,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,yDAAyD,MAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,mCAAI,mBAAmB,WAAW,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CACrK,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,2BAAmB,CAAC,CAAC;IACpC,CAAC;AACH,CAAC;AAED,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,IAAI,EAAE,CAAC;AACT,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { type CommandEnd, type CrateOutcome, type OutputCrate, type OutputScope } from "./cargo-output";
|
|
2
|
+
import type { RecordEntry } from "./test-runner";
|
|
3
|
+
/**
|
|
4
|
+
* What the selecting runner recorded in the test binaries' step
|
|
5
|
+
* (`DES-TEST-RUN`, "The selecting runner"): one record per start, or why
|
|
6
|
+
* the record folder could not be read.
|
|
7
|
+
*/
|
|
8
|
+
export type RunnerRecords = {
|
|
9
|
+
records: RunnerRecord[];
|
|
10
|
+
} | {
|
|
11
|
+
unreadable: string;
|
|
12
|
+
};
|
|
13
|
+
/** One start of the selecting runner, from its file in the record folder. */
|
|
14
|
+
export interface RunnerRecord {
|
|
15
|
+
/** The file's name, for messages. */
|
|
16
|
+
file: string;
|
|
17
|
+
/** What the runner recorded first: the package and the program. */
|
|
18
|
+
start?: {
|
|
19
|
+
package: string;
|
|
20
|
+
program: string;
|
|
21
|
+
};
|
|
22
|
+
/** The entries after the start, in order: a skip, an error or the end. */
|
|
23
|
+
after: RecordEntry[];
|
|
24
|
+
/** A line of the file that is no entry. */
|
|
25
|
+
malformed?: string;
|
|
26
|
+
}
|
|
27
|
+
/** The selecting runner's command and the list of packages, for messages. */
|
|
28
|
+
export interface RunnerSetup {
|
|
29
|
+
/** The command that cargo starts for each test executable, as words. */
|
|
30
|
+
command: readonly string[];
|
|
31
|
+
/** The value of `NX_RUST_TEST_PACKAGES`. */
|
|
32
|
+
packages: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Splits text output into blocks that each start with a line of
|
|
36
|
+
* {@link startsBlock}, the lines before the first being a block of their own,
|
|
37
|
+
* and gives each to the crates it concerns: a block whose first line or a
|
|
38
|
+
* location line (` --> path:line:col`) names a crate of the group goes to that
|
|
39
|
+
* crate; one that concerns only a member outside the group is left out,
|
|
40
|
+
* unless it is an error, which can explain a failure and goes to every
|
|
41
|
+
* crate; every other block goes to every crate.
|
|
42
|
+
*/
|
|
43
|
+
export declare function attributeText(lines: readonly string[], crates: readonly OutputCrate[], scope: OutputScope | undefined): string[][];
|
|
44
|
+
/** The crates that cargo's text says did not compile, each once, in order. */
|
|
45
|
+
export declare function notCompiled(lines: readonly string[]): string[];
|
|
46
|
+
/**
|
|
47
|
+
* Fails every crate because a test step stopped before any test ran, with a
|
|
48
|
+
* message that names the crates that did not compile, `what` being the
|
|
49
|
+
* command, and says which of them are outside the group (`DES-BATCH`, "Test
|
|
50
|
+
* runs").
|
|
51
|
+
*/
|
|
52
|
+
export declare function failStopped(crates: readonly OutputCrate[], parts: readonly string[], names: readonly string[], outsideNames: ReadonlySet<string>, what: string): CrateOutcome[];
|
|
53
|
+
/**
|
|
54
|
+
* Reads the build step of `test` under `workspace-build`, `cargo test
|
|
55
|
+
* --workspace --no-run` (`DES-TEST-RUN`, "Under `workspace-build`"): every
|
|
56
|
+
* crate passes the step where cargo exits with status 0, and every crate
|
|
57
|
+
* fails otherwise, since a compile error stops the step and no test can run;
|
|
58
|
+
* the message names the crates that did not compile, says which of them are
|
|
59
|
+
* outside the selection, and that the tests of the others were not run
|
|
60
|
+
* (`DES-BATCH`, "Test runs"). Each crate's output holds the compiler's
|
|
61
|
+
* messages about it and those that the output does not attribute to one
|
|
62
|
+
* crate ({@link attributeText}).
|
|
63
|
+
*/
|
|
64
|
+
export declare function readTestsBuildStep(output: string, end: CommandEnd, crates: readonly OutputCrate[], scope: OutputScope): CrateOutcome[];
|
|
65
|
+
/**
|
|
66
|
+
* Reads the test binaries' step under `workspace-build` (`DES-TEST-RUN`,
|
|
67
|
+
* "Evidence for test binaries"), from cargo's JSON messages, the selecting
|
|
68
|
+
* runner's record and cargo's exit status only, never from a line that cargo
|
|
69
|
+
* writes for people or that a test writes.
|
|
70
|
+
*
|
|
71
|
+
* Every `compiler-artifact` message with `executable` and `profile.test`
|
|
72
|
+
* anywhere in the output, where a line holds `{"reason":`, adds an expected
|
|
73
|
+
* test executable of its `package_id`, so that a line that is not cargo's
|
|
74
|
+
* can add an expectation and never remove one. Every crate fails where cargo
|
|
75
|
+
* ended in a way that the reading cannot explain, where such a line is no
|
|
76
|
+
* JSON message, where a `build-finished` message reports a failure or none
|
|
77
|
+
* appears, where a test executable belongs to no member, where the record
|
|
78
|
+
* folder cannot be read or holds an error entry or a malformed line, and
|
|
79
|
+
* where cargo failed while no record explains it. Otherwise a crate passes
|
|
80
|
+
* only where every expected executable of its package has exactly one
|
|
81
|
+
* record, of that program by real path and of its package, ending with the
|
|
82
|
+
* status 0, and no record of its package ends otherwise.
|
|
83
|
+
*
|
|
84
|
+
* Each crate's output holds the output after cargo's `Running` line for one
|
|
85
|
+
* of its executables, which the JSON names, and the lines that the output
|
|
86
|
+
* does not attribute to one crate; the `Running` lines of the executables of
|
|
87
|
+
* other members, which the runner skipped, are left out.
|
|
88
|
+
*/
|
|
89
|
+
export declare function readTestBinariesStep(output: string, end: CommandEnd, crates: readonly OutputCrate[], scope: OutputScope, record: RunnerRecords, runner: RunnerSetup): CrateOutcome[];
|
|
90
|
+
/**
|
|
91
|
+
* Reads the doctest step under `workspace-build`, `cargo test --workspace
|
|
92
|
+
* --doc --no-fail-fast` (`DES-TEST-RUN`, "Doctest results"): cargo decides
|
|
93
|
+
* every doctest as for a plain `cargo test --doc`. Where cargo exits with 0,
|
|
94
|
+
* every crate passes; where it exits with 101, a crate passes where cargo's
|
|
95
|
+
* list of failed targets, the last one and only where it ends the output,
|
|
96
|
+
* names no target of its package; an entry without `-p` names the only
|
|
97
|
+
* member. Every crate fails where cargo exits otherwise, where it fails
|
|
98
|
+
* without a list that ends the output, where the list is not what its first
|
|
99
|
+
* line announces, and where it names a package that is no member. A failing
|
|
100
|
+
* doctest of a member outside the group fails no task: each crate gets a
|
|
101
|
+
* warning that names it (`DES-DIAGNOSTICS`).
|
|
102
|
+
*
|
|
103
|
+
* Each crate's output holds the block after a `Doc-tests` line that names
|
|
104
|
+
* its library, and the lines that the output does not attribute to one
|
|
105
|
+
* crate; the blocks of other members are left out.
|
|
106
|
+
*/
|
|
107
|
+
export declare function readDoctestStep(output: string, end: CommandEnd, crates: readonly OutputCrate[], scope: OutputScope): CrateOutcome[];
|
|
108
|
+
/** The lines of a step's output, without the empty one after a last newline. */
|
|
109
|
+
export declare function splitLines(output: string): string[];
|