|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +set -ex |
| 4 | + |
| 5 | +# Only run the stage 1 tests on merges, not on PR CI jobs. |
| 6 | +if [[ -z "${PR_CI_JOB}" ]]; then |
| 7 | +../x.py --stage 1 test --exclude src/tools/tidy && \ |
| 8 | + # Run the `mir-opt` tests again but this time for a 32-bit target. |
| 9 | + # This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have |
| 10 | + # both 32-bit and 64-bit outputs updated by the PR author, before |
| 11 | + # the PR is approved and tested for merging. |
| 12 | + # It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`, |
| 13 | + # despite having different output on 32-bit vs 64-bit targets. |
| 14 | + ../x.py --stage 1 test tests/mir-opt \ |
| 15 | + --host='' --target=i686-unknown-linux-gnu |
| 16 | +fi |
| 17 | + |
| 18 | +# NOTE: intentionally uses all of `x.py`, `x`, and `x.ps1` to make sure they all work on Linux. |
| 19 | +../x.py --stage 2 test --exclude src/tools/tidy && \ |
| 20 | + # Run the `mir-opt` tests again but this time for a 32-bit target. |
| 21 | + # This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have |
| 22 | + # both 32-bit and 64-bit outputs updated by the PR author, before |
| 23 | + # the PR is approved and tested for merging. |
| 24 | + # It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`, |
| 25 | + # despite having different output on 32-bit vs 64-bit targets. |
| 26 | + ../x --stage 2 test tests/mir-opt \ |
| 27 | + --host='' --target=i686-unknown-linux-gnu && \ |
| 28 | + # Run the UI test suite again, but in `--pass=check` mode |
| 29 | + # |
| 30 | + # This is intended to make sure that both `--pass=check` continues to |
| 31 | + # work. |
| 32 | + # |
| 33 | + ../x.ps1 --stage 2 test tests/ui --pass=check \ |
| 34 | + --host='' --target=i686-unknown-linux-gnu |
0 commit comments