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.
16 lines
547 B
Bash
16 lines
547 B
Bash
# This test covers importing modules which are defined in multiple packages
|
|
# (with the same original package name).
|
|
|
|
./clean.sh
|
|
run lake resolve-deps
|
|
|
|
# Test that importing a module with multiple identical candidates works
|
|
run lake build Test.ImportSame
|
|
|
|
# Test that importing a module with multiple sufficiently similar candidates works
|
|
run lake build Test.ImportSimilar
|
|
|
|
# Test that importing a module with multiple distinct candidates fails
|
|
capture_fail lake build Test.ImportDiff
|
|
check_out_contains 'could not disambiguate the module `Diff`'
|