wyvrnpm 2.17.0 → 2.18.0
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/README.md +56 -0
- package/bin/wyvrnpm.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -473,6 +473,62 @@ Everything after `--` is forwarded verbatim to `cmake --build` (e.g. `-j 8`).
|
|
|
473
473
|
|
|
474
474
|
---
|
|
475
475
|
|
|
476
|
+
### `wyvrnpm test` (2.18.0+)
|
|
477
|
+
|
|
478
|
+
Runs ctest against the wyvrnpm-generated test preset (`wyvrn-<profile>-<config>`). Auto-runs `wyvrnpm build` first if the toolchain or build outputs are stale — disable with `--no-build` for a pure ctest pass.
|
|
479
|
+
|
|
480
|
+
```bash
|
|
481
|
+
wyvrnpm test # Release config, auto-builds if stale
|
|
482
|
+
wyvrnpm test --all-configs # Loop over every recipe config
|
|
483
|
+
wyvrnpm test --config Debug,Release # Comma-separated config list
|
|
484
|
+
wyvrnpm test -R BasicSpatialGrid # Filter by test-name regex
|
|
485
|
+
wyvrnpm test -L fast # Filter by label
|
|
486
|
+
wyvrnpm test --format json # JSON summary on stdout for CI
|
|
487
|
+
wyvrnpm test --no-build # Skip auto-build, just run ctest
|
|
488
|
+
wyvrnpm test -- --output-on-failure -j 8 # Passthru to ctest
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
| Flag | Default | Description |
|
|
492
|
+
|---|---|---|
|
|
493
|
+
| `--preset` / `-P` | `wyvrn-<profile>-<config>` | Override the test preset name |
|
|
494
|
+
| `--profile` / `-p` | *(config)* | Build profile — selects the preset family |
|
|
495
|
+
| `--config` / `-c` | `Release` | Single or comma-separated config list |
|
|
496
|
+
| `--all-configs` | `false` | Loop over every config the recipe declares (or all four canonical configs) |
|
|
497
|
+
| `--verbose` / `-v` | `false` | Forwards `-V` to ctest (per-test detail) |
|
|
498
|
+
| `--tests-regex` / `-R` | — | Run only tests whose name matches the regex |
|
|
499
|
+
| `--label-regex` / `-L` | — | Run only tests whose label matches the regex |
|
|
500
|
+
| `--auto-build` | `true` | Auto-run `wyvrnpm build` when toolchain is stale. `--no-build` opts out. |
|
|
501
|
+
| `--source` / `-s` | *(config)* | Forwarded to auto-build when triggered |
|
|
502
|
+
| `--build-dir` | `build` | Must match the value used at install time. Persist via `wyvrn.local.json:binaryDirRoot`. |
|
|
503
|
+
| `--format` | `text` | `text` (default) streams ctest verbatim; `json` emits a structured summary on stdout, logs to stderr |
|
|
504
|
+
|
|
505
|
+
Everything after `--` is forwarded verbatim to `ctest` (e.g. `--repeat until-pass:3`, `--output-junit results.xml`).
|
|
506
|
+
|
|
507
|
+
**`--format json` summary**:
|
|
508
|
+
|
|
509
|
+
```json
|
|
510
|
+
{
|
|
511
|
+
"command": "test",
|
|
512
|
+
"wyvrnpmVersion": "2.18.0",
|
|
513
|
+
"profile": "default",
|
|
514
|
+
"configs": [
|
|
515
|
+
{ "config": "Release", "preset": "wyvrn-default-release",
|
|
516
|
+
"total": 42, "passed": 40, "failed": 2,
|
|
517
|
+
"durationMs": 1234, "exitCode": 8 }
|
|
518
|
+
],
|
|
519
|
+
"totalConfigs": 1,
|
|
520
|
+
"passedConfigs": 0,
|
|
521
|
+
"failedConfigs": 1,
|
|
522
|
+
"ok": false
|
|
523
|
+
}
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
Exit code is `0` iff every config passes; `1` otherwise. CI scripts should gate on the `ok` field or the exit code, not on the text output.
|
|
527
|
+
|
|
528
|
+
**Test-only deps pattern.** For projects that need a test framework like Catch2 / GoogleTest only during the build, the canonical recipe is to declare an `options.tests` toggle and list the framework in `buildDependencies` with `whenOption: "tests"` (see §4.1 of [CLAUDE.md](CLAUDE.md)). Consumers pulling the prebuilt artefact never see the test deps; running `wyvrnpm install -o <Pkg>:tests=true && wyvrnpm test` from the project root fetches them and runs the suite.
|
|
529
|
+
|
|
530
|
+
---
|
|
531
|
+
|
|
476
532
|
### `wyvrnpm publish`
|
|
477
533
|
|
|
478
534
|
Zips the project directory and uploads `wyvrn.json` + `wyvrn.zip` to the destination source, tagged with the active build profile.
|
package/bin/wyvrnpm.js
CHANGED