build: replace make with test script
This commit is contained in:
parent
537f77f092
commit
1fa6555813
|
|
@ -12,7 +12,7 @@ pipeline {
|
|||
}
|
||||
|
||||
stage('Test') {
|
||||
steps { sh 'make test' }
|
||||
steps { sh './test.sh' }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
16
Makefile
16
Makefile
|
|
@ -1,16 +0,0 @@
|
|||
.PHONY: help analyse validate test check
|
||||
INPUT ?= examples/diagnostic.json
|
||||
|
||||
help:
|
||||
@echo 'make analyse INPUT=... EVIDENCE_ROOT=... OUTPUT=... REFERENCE_TIME=...'
|
||||
@echo 'make validate INPUT=... EVIDENCE_ROOT=...'
|
||||
@echo 'make test'
|
||||
analyse:
|
||||
bash tools/analyse.sh "$(INPUT)" --evidence-root "$(EVIDENCE_ROOT)" --output "$(OUTPUT)" --reference-time "$(REFERENCE_TIME)" --producer-version "$$(git rev-parse HEAD)"
|
||||
validate:
|
||||
bash tools/validate.sh "$(INPUT)" --evidence-root "$(EVIDENCE_ROOT)"
|
||||
test:
|
||||
uv venv --python 3.11 --allow-existing .venv
|
||||
uv pip sync --python .venv/bin/python requirements.txt
|
||||
.venv/bin/python -m unittest discover -s tests -p 'test_*.py' -v
|
||||
check: test
|
||||
|
|
@ -5,11 +5,11 @@ is documented in the main [README](../README.md).
|
|||
|
||||
## Test environment
|
||||
|
||||
Tests require uv. The Makefile creates `.venv`, synchronizes the pinned packages
|
||||
Tests require uv. `test.sh` creates `.venv` and synchronizes the pinned packages
|
||||
from `requirements.txt`, and invokes Python only from that environment.
|
||||
|
||||
```bash
|
||||
make test
|
||||
./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 `make test` and `git diff --check`.
|
||||
4. Run `./test.sh` and `git diff --check`.
|
||||
|
||||
## Contract changes
|
||||
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ examples, not a migrated collector or analysis engine.
|
|||
Bash and Typst 0.15 or newer are required at runtime. From a standalone component checkout:
|
||||
|
||||
```bash
|
||||
make validate INPUT=examples/diagnostic.json
|
||||
make validate INPUT=examples/diagnostic.json EVIDENCE_ROOT=tests/fixtures/legacy
|
||||
make test
|
||||
bash tools/validate.sh examples/diagnostic.json
|
||||
bash tools/validate.sh examples/diagnostic.json --evidence-root tests/fixtures/legacy
|
||||
./test.sh
|
||||
```
|
||||
|
||||
The test target creates a uv-managed Python environment and synchronizes the
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ beffroi-reports, the integration workspace, and legacy sources are not runtime
|
|||
dependencies.
|
||||
|
||||
```bash
|
||||
make test
|
||||
./test.sh
|
||||
```
|
||||
|
||||
```bash
|
||||
|
|
|
|||
Reference in New Issue