chore: move test tooling under tests
Win Diagnostics CI All diagnostic checks passed.
Beffroi/win-diagnostics/pipeline/head This commit looks good
Details
Win Diagnostics CI All diagnostic checks passed.
Beffroi/win-diagnostics/pipeline/head This commit looks good
Details
This commit is contained in:
parent
cce15ebda6
commit
91eb474dc0
|
|
@ -12,7 +12,7 @@ pipeline {
|
|||
}
|
||||
|
||||
stage('Test') {
|
||||
steps { sh './test.sh' }
|
||||
steps { sh './tests/test.sh' }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ is documented in the main [README](../README.md).
|
|||
## Test environment
|
||||
|
||||
Tests require uv. `test.sh` creates `.venv` and synchronizes the pinned packages
|
||||
from `requirements.txt`, and invokes Python only from that environment.
|
||||
from `tests/requirements.txt`, and invokes Python only from that environment.
|
||||
|
||||
```bash
|
||||
./test.sh
|
||||
./tests/test.sh
|
||||
```
|
||||
|
||||
The suite covers diagnostic contract validation, evidence hashes and JSON
|
||||
|
|
@ -29,7 +29,7 @@ When changing a rule:
|
|||
1. Add or update a sanitized fixture that exercises the behavior.
|
||||
2. Verify finding identity, severity, confidence, and evidence references.
|
||||
3. Confirm incomplete collection cannot imply a healthy result.
|
||||
4. Run `./test.sh` and `git diff --check`.
|
||||
4. Run `./tests/test.sh` and `git diff --check`.
|
||||
|
||||
## Contract changes
|
||||
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@ Bash and Typst 0.15 or newer are required at runtime. From a standalone componen
|
|||
```bash
|
||||
bash tools/validate.sh examples/diagnostic.json
|
||||
bash tools/validate.sh examples/diagnostic.json --evidence-root tests/fixtures/legacy
|
||||
./test.sh
|
||||
./tests/test.sh
|
||||
```
|
||||
|
||||
The test target creates a uv-managed Python environment and synchronizes the
|
||||
pinned test dependencies from `requirements.txt`.
|
||||
pinned test dependencies from `tests/requirements.txt`.
|
||||
No Typst, Reportist, macro checkout, network service, or live Windows machine is
|
||||
needed after dependencies are installed. Validation accepts an explicit JSON path,
|
||||
writes no artifacts, and exits 0 for valid input, 1 for invalid/unreadable input or
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ beffroi-reports, the integration workspace, and legacy sources are not runtime
|
|||
dependencies.
|
||||
|
||||
```bash
|
||||
./test.sh
|
||||
./tests/test.sh
|
||||
```
|
||||
|
||||
```bash
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Pinned dependencies for the Python test oracle.
|
||||
# Update versions here intentionally, then run ./test.sh.
|
||||
# Update versions here intentionally, then run ./tests/test.sh.
|
||||
attrs==26.1.0
|
||||
# via
|
||||
# jsonschema
|
||||
|
|
@ -11,7 +11,7 @@ try:
|
|||
import rfc3339_validator # Required so date-time formats cannot be silently ignored.
|
||||
from jsonschema import Draft202012Validator, FormatChecker
|
||||
except ImportError:
|
||||
raise SystemExit("Prepare test dependencies with: ./test.sh")
|
||||
raise SystemExit("Prepare test dependencies with: ./tests/test.sh")
|
||||
|
||||
SCHEMA = json.loads((Path(__file__).resolve().parents[1] / "schemas/diagnostic.schema.json").read_text())
|
||||
Draft202012Validator.check_schema(SCHEMA)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
||||
uv venv --python 3.11 --allow-existing .venv
|
||||
uv pip sync --python .venv/bin/python requirements.txt
|
||||
uv pip sync --python .venv/bin/python tests/requirements.txt
|
||||
.venv/bin/python -m unittest discover -s tests -p 'test_*.py' -v
|
||||
Reference in New Issue