From b964b0066833bc4deb8ebc3bae218a5298da82a9 Mon Sep 17 00:00:00 2001 From: Dion Dokter Date: Fri, 17 May 2024 11:47:18 +0200 Subject: Run tests with the flag enabled --- src/ci/docker/scripts/x86_64-gnu-llvm.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm.sh b/src/ci/docker/scripts/x86_64-gnu-llvm.sh index 2eb751ca376..1f4ba498673 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm.sh @@ -6,10 +6,15 @@ set -ex if [[ -z "${PR_CI_JOB}" ]]; then # When running gcc backend tests, we need to install `libgccjit` and to not run llvm codegen # tests as it will fail them. + # The tests are run a second time with the size optimizations enabled. if [[ "${ENABLE_GCC_CODEGEN}" == "1" ]]; then ../x.py --stage 1 test --skip src/tools/tidy --skip tests/codegen + ../x.py --stage 1 test --skip src/tools/tidy --skip tests/codegen \ + --rustc-args "--cfg feature=\"optimize_for_size\"" else ../x.py --stage 1 test --skip src/tools/tidy + ../x.py --stage 1 test --skip src/tools/tidy --rustc-args \ + "--cfg feature=\"optimize_for_size\"" fi # Run the `mir-opt` tests again but this time for a 32-bit target. -- cgit 1.4.1-3-g733a5 From 5c301429bd5fe54351f2c88a6c9b4114abcb1880 Mon Sep 17 00:00:00 2001 From: Dion Dokter Date: Fri, 17 May 2024 12:02:21 +0200 Subject: Only test std, alloc and core --- src/ci/docker/scripts/x86_64-gnu-llvm.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm.sh b/src/ci/docker/scripts/x86_64-gnu-llvm.sh index 1f4ba498673..fe545e1d5f7 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm.sh @@ -9,12 +9,12 @@ if [[ -z "${PR_CI_JOB}" ]]; then # The tests are run a second time with the size optimizations enabled. if [[ "${ENABLE_GCC_CODEGEN}" == "1" ]]; then ../x.py --stage 1 test --skip src/tools/tidy --skip tests/codegen - ../x.py --stage 1 test --skip src/tools/tidy --skip tests/codegen \ + ../x.py --stage 1 test library/std library/alloc library/core \ --rustc-args "--cfg feature=\"optimize_for_size\"" else ../x.py --stage 1 test --skip src/tools/tidy - ../x.py --stage 1 test --skip src/tools/tidy --rustc-args \ - "--cfg feature=\"optimize_for_size\"" + ../x.py --stage 1 test library/std library/alloc library/core \ + --rustc-args "--cfg feature=\"optimize_for_size\"" fi # Run the `mir-opt` tests again but this time for a 32-bit target. -- cgit 1.4.1-3-g733a5 From 0d23a71ec2c79bc2da6b3fa8fa6386817e5856c5 Mon Sep 17 00:00:00 2001 From: Dion Dokter Date: Mon, 20 May 2024 12:18:24 +0200 Subject: Deduplicate test command --- src/ci/docker/scripts/x86_64-gnu-llvm.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm.sh b/src/ci/docker/scripts/x86_64-gnu-llvm.sh index fe545e1d5f7..8f5f7fdbe47 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm.sh @@ -6,17 +6,16 @@ set -ex if [[ -z "${PR_CI_JOB}" ]]; then # When running gcc backend tests, we need to install `libgccjit` and to not run llvm codegen # tests as it will fail them. - # The tests are run a second time with the size optimizations enabled. if [[ "${ENABLE_GCC_CODEGEN}" == "1" ]]; then ../x.py --stage 1 test --skip src/tools/tidy --skip tests/codegen - ../x.py --stage 1 test library/std library/alloc library/core \ - --rustc-args "--cfg feature=\"optimize_for_size\"" else ../x.py --stage 1 test --skip src/tools/tidy - ../x.py --stage 1 test library/std library/alloc library/core \ - --rustc-args "--cfg feature=\"optimize_for_size\"" fi + # The tests are run a second time with the size optimizations enabled. + ../x.py --stage 1 test library/std library/alloc library/core \ + --rustc-args "--cfg feature=\"optimize_for_size\"" + # Run the `mir-opt` tests again but this time for a 32-bit target. # This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have # both 32-bit and 64-bit outputs updated by the PR author, before -- cgit 1.4.1-3-g733a5 From bd71c71ea04b4a4f954e579c2a6d44113274846a Mon Sep 17 00:00:00 2001 From: Dion Dokter Date: Mon, 20 May 2024 12:50:37 +0200 Subject: Move tests to more opportune point --- src/ci/docker/scripts/x86_64-gnu-llvm.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm.sh b/src/ci/docker/scripts/x86_64-gnu-llvm.sh index 8f5f7fdbe47..876b300d35c 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm.sh @@ -12,10 +12,6 @@ if [[ -z "${PR_CI_JOB}" ]]; then ../x.py --stage 1 test --skip src/tools/tidy fi - # The tests are run a second time with the size optimizations enabled. - ../x.py --stage 1 test library/std library/alloc library/core \ - --rustc-args "--cfg feature=\"optimize_for_size\"" - # Run the `mir-opt` tests again but this time for a 32-bit target. # This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have # both 32-bit and 64-bit outputs updated by the PR author, before @@ -27,6 +23,10 @@ if [[ -z "${PR_CI_JOB}" ]]; then # Run `ui-fulldeps` in `--stage=1`, which actually uses the stage0 # compiler, and is sensitive to the addition of new flags. ../x.py --stage 1 test tests/ui-fulldeps + + # The tests are run a second time with the size optimizations enabled. + ../x.py --stage 1 test library/std library/alloc library/core \ + --rustc-args "--cfg feature=\"optimize_for_size\"" fi # When running gcc backend tests, we need to install `libgccjit` and to not run llvm codegen -- cgit 1.4.1-3-g733a5