Split rustc tests in two

This commit is contained in:
Guillaume Gomez 2022-06-30 16:35:53 +02:00
parent 9edaf82a03
commit 0ba53c8211
4 changed files with 108 additions and 2 deletions

View File

@ -24,7 +24,8 @@ jobs:
"--std-tests",
"--test-libcore",
"--extended-tests",
"--test-rustc",
"--test-successful-rustc",
"--test-failing-rustc",
]
steps:
@ -111,6 +112,10 @@ jobs:
command: build
args: --release
- name: Add more failing tests for GCC 12
if: ${{ matrix.libgccjit_version.gcc == 'libgccjit12.so' }}
run: cat failing-ui-tests12.txt >> failing-ui-tests.txt
- name: Run tests
run: |
./test.sh --release --clean --build-sysroot ${{ matrix.commands }} ${{ matrix.libgccjit_version.extra }}

55
failing-ui-tests.txt Normal file
View File

@ -0,0 +1,55 @@
src/test/ui/alloc-error/default-alloc-error-hook.rs
src/test/ui/allocator/custom-in-block.rs
src/test/ui/allocator/custom-in-submodule.rs
src/test/ui/allocator/custom.rs
src/test/ui/allocator/hygiene.rs
src/test/ui/allocator/no_std-alloc-error-handler-custom.rs
src/test/ui/allocator/no_std-alloc-error-handler-default.rs
src/test/ui/allocator/xcrate-use.rs
src/test/ui/allocator/xcrate-use2.rs
src/test/ui/asm/may_unwind.rs
src/test/ui/asm/x86_64/const.rs
src/test/ui/asm/x86_64/multiple-clobber-abi.rs
src/test/ui/async-await/async-fn-size-moved-locals.rs
src/test/ui/async-await/async-fn-size-uninit-locals.rs
src/test/ui/backtrace.rs
src/test/ui/cfg/cfg-panic.rs
src/test/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs
src/test/ui/functions-closures/parallel-codegen-closures.rs
src/test/ui/generator/size-moved-locals.rs
src/test/ui/issues/issue-32518.rs
src/test/ui/issues/issue-47364.rs
src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs
src/test/ui/linkage-attr/linkage1.rs
src/test/ui/lto/dylib-works.rs
src/test/ui/mir/mir_heavy_promoted.rs
src/test/ui/numbers-arithmetic/saturating-float-casts.rs
src/test/ui/polymorphization/promoted-function.rs
src/test/ui/runtime/rt-explody-panic-payloads.rs
src/test/ui/sepcomp/sepcomp-cci.rs
src/test/ui/sepcomp/sepcomp-extern.rs
src/test/ui/sepcomp/sepcomp-fns-backwards.rs
src/test/ui/sepcomp/sepcomp-fns.rs
src/test/ui/sepcomp/sepcomp-lib.rs
src/test/ui/sepcomp/sepcomp-statics.rs
src/test/ui/simd/generics.rs
src/test/ui/simd/intrinsic/float-math-pass.rs
src/test/ui/simd/intrinsic/float-minmax-pass.rs
src/test/ui/simd/intrinsic/generic-arithmetic-pass.rs
src/test/ui/simd/intrinsic/generic-as.rs
src/test/ui/simd/intrinsic/generic-bitmask-pass.rs
src/test/ui/simd/intrinsic/generic-comparison-pass.rs
src/test/ui/simd/intrinsic/generic-gather-pass.rs
src/test/ui/simd/intrinsic/generic-reduction-pass.rs
src/test/ui/simd/intrinsic/generic-select-pass.rs
src/test/ui/simd/issue-17170.rs
src/test/ui/simd/issue-39720.rs
src/test/ui/simd/issue-85915-simd-ptrs.rs
src/test/ui/simd/issue-89193.rs
src/test/ui/simd/libm_std_can_float.rs
src/test/ui/simd/simd-bitmask.rs
src/test/ui/simd/type-generic-monomorphisation-extern-nonnull-ptr.rs
src/test/ui/sse2.rs
src/test/ui/statics/issue-91050-1.rs
src/test/ui/statics/issue-91050-2.rs
src/test/ui/target-feature/missing-plusminus.rs

17
failing-ui-tests12.txt Normal file
View File

@ -0,0 +1,17 @@
src/test/ui/intrinsics/const-eval-select-x86_64.rs
src/test/ui/packed/packed-struct-drop-aligned.rs
src/test/ui/packed/packed-struct-generic-layout.rs
src/test/ui/packed/packed-struct-layout.rs
src/test/ui/packed/packed-struct-optimized-enum.rs
src/test/ui/packed/packed-struct-size.rs
src/test/ui/packed/packed-struct-vec.rs
src/test/ui/packed/packed-tuple-struct-layout.rs
src/test/ui/simd/array-type.rs
src/test/ui/simd/intrinsic/generic-arithmetic-saturating-pass.rs
src/test/ui/simd/intrinsic/generic-cast-pass.rs
src/test/ui/simd/intrinsic/generic-cast-pointer-width.rs
src/test/ui/simd/intrinsic/generic-elements-pass.rs
src/test/ui/simd/intrinsic/inlining-issue67557-ice.rs
src/test/ui/simd/intrinsic/inlining-issue67557.rs
src/test/ui/simd/monomorphize-shuffle-index.rs
src/test/ui/simd/shuffle.rs

31
test.sh
View File

@ -42,7 +42,15 @@ while [[ $# -gt 0 ]]; do
shift
;;
"--test-rustc")
funcs+=(test_rustc)
funcs=(test_rustc)
shift
;;
"--test-successful-rustc")
funcs+=(test_successful_rustc)
shift
;;
"--test-failing-rustc")
funcs+=(test_failing_rustc)
shift
;;
@ -276,10 +284,31 @@ EOF
RUSTC_ARGS="-Zpanic-abort-tests -Csymbol-mangling-version=v0 -Zcodegen-backend="$(pwd)"/../target/"$CHANNEL"/librustc_codegen_gcc."$dylib_ext" --sysroot "$(pwd)"/../build_sysroot/sysroot -Cpanic=abort"
if [ $# -eq 0 ]; then
# No argument supplied to the function. Doing nothing.
echo "No argument provided. Keeping all UI tests"
elif [ $1 = "0" ]; then
# Removing the failing tests.
xargs -a ../failing-ui-tests.txt -d'\n' rm
else
# Removing all tests.
find src/test/ui -type f -name '*.rs' -exec rm {} \;
# Putting back only the failing ones.
xargs -a ../failing-ui-tests.txt -d'\n' git checkout --
fi
echo "[TEST] rustc test suite"
COMPILETEST_FORCE_STAGE0=1 ./x.py test --run always --stage 0 src/test/ui/ --rustc-args "$RUSTC_ARGS"
}
function test_failing_rustc() {
test_rustc "1"
}
function test_successful_rustc() {
test_rustc "0"
}
function clean_ui_tests() {
find rust/build/x86_64-unknown-linux-gnu/test/ui/ -name stamp -exec rm -rf {} \;
}