22 lines
985 B
Bash
Executable File
22 lines
985 B
Bash
Executable File
#!/bin/bash
|
|
# Parity pipeline. Usage: tools/parity.sh run|check [extra parity_diff.py args]
|
|
# run regenerate cases, run the differential harness, mine test_tai.py, rebuild the ledger
|
|
# and the committed PARITY.md. Exit 0 unless a non-expected case failed.
|
|
# check same as run, then exit 1 while any symbol is missing or unverified, a case names an
|
|
# unknown symbol, or the evidence is stale. This is `make parity-check`.
|
|
# Outputs go to build/parity/ (PARITY.md is published to taicpp/PARITY.md by --publish).
|
|
set -u
|
|
cd "$(dirname "$0")/.." || exit 2
|
|
mode="${1:-run}"
|
|
shift || true
|
|
rc=0
|
|
python3 tools/parity_gen_cases.py --check || { echo "regenerating cli_generated.json"; python3 tools/parity_gen_cases.py || exit 2; }
|
|
python3 tools/parity_diff.py "$@" || rc=1
|
|
python3 tools/parity_tests.py || rc=1
|
|
if [ "$mode" = "check" ]; then
|
|
python3 tools/parity_ledger.py --publish --check || rc=1
|
|
else
|
|
python3 tools/parity_ledger.py --publish || rc=1
|
|
fi
|
|
exit $rc
|