mirror of
https://github.com/leanprover/lean4.git
synced 2026-03-17 10:24:07 +00:00
The tests need to run with certain environment variables set that only cmake really knows and that differ between stages. Cmake could just set the variables directly when running the tests and benchmarks, but that would leave no good way to manually run a single benchmark. So cmake generates some stage-specific scripts instead that set the required environment variables. Previously, those scripts were sourced directly by the individual `run_*` scripts, so the env scripts of different stages would overwrite each other. This PR changes the setup so they can instead be generated next to each other. This also simplifies the `run_*` scripts themselves a bit, and makes `tests/bench/build` less of a hack.
42 lines
1.2 KiB
Bash
42 lines
1.2 KiB
Bash
PREFIX="lake/inundation"
|
|
rm -f measurements.jsonl
|
|
|
|
echo "Running $PREFIX/build clean"
|
|
cp lakefile.lean lakefile-clean.lean
|
|
lake -f lakefile-clean.lean -R -K test=Clean run mkBuild
|
|
lake -f lakefile-clean.lean build
|
|
"$TEST_DIR/measure.py" -t "$PREFIX/build clean" -d -a -- \
|
|
bash -c "lake -f lakefile-clean.lean clean && lake -f lakefile-clean.lean build"
|
|
|
|
echo "Running $PREFIX/build no-op"
|
|
cp lakefile.lean lakefile-nop.lean
|
|
lake -f lakefile-nop.lean -R -K test=Nop run mkBuild
|
|
lake -f lakefile-nop.lean build
|
|
"$TEST_DIR/measure.py" -t "$PREFIX/build no-op" -d -a -- \
|
|
lake -f lakefile-nop.lean build
|
|
|
|
echo "Running $PREFIX/config elab"
|
|
cp lakefile.lean lakefile-rc.lean
|
|
"$TEST_DIR/measure.py" -t "$PREFIX/config elab" -d -a -- \
|
|
lake -f lakefile-rc.lean -R run nop
|
|
|
|
echo "Running $PREFIX/config import"
|
|
lake run nop
|
|
"$TEST_DIR/measure.py" -t "$PREFIX/config import" -d -a -- \
|
|
lake run nop
|
|
|
|
echo "Running $PREFIX/config tree"
|
|
lake run mkTree
|
|
lake -d test/tree update
|
|
"$TEST_DIR/measure.py" -t "$PREFIX/config tree" -d -a -- \
|
|
lake -d test/tree run nop
|
|
|
|
echo "Running $PREFIX/env"
|
|
lake env true
|
|
"$TEST_DIR/measure.py" -t "$PREFIX/env" -d -a -- \
|
|
lake env true
|
|
|
|
echo "Running $PREFIX/startup"
|
|
"$TEST_DIR/measure.py" -t "$PREFIX/startup" -d -a -- \
|
|
lake self-check
|