build: replace make with test script

This commit is contained in:
Dandaedre 2026-09-16 01:30:46 +02:00
parent 537f77f092
commit 1fa6555813
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
6 changed files with 14 additions and 24 deletions

2
Jenkinsfile vendored
View File

@ -12,7 +12,7 @@ pipeline {
}
stage('Test') {
steps { sh 'make test' }
steps { sh './test.sh' }
}
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -8,7 +8,7 @@ beffroi-reports, the integration workspace, and legacy sources are not runtime
dependencies.
```bash
make test
./test.sh
```
```bash

6
test.sh Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
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