]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh
New upstream version 1.68.2+dfsg1
[rustc.git] / compiler / rustc_codegen_cranelift / scripts / test_rustc_tests.sh
CommitLineData
04454e1e 1#!/usr/bin/env bash
cdc7bbd5
XL
2set -e
3
4cd $(dirname "$0")/../
5
6source ./scripts/setup_rust_fork.sh
7
8echo "[TEST] Test suite of rustc"
9pushd rust
10
5e7ed085 11command -v rg >/dev/null 2>&1 || cargo install ripgrep
cdc7bbd5 12
9c376795
FG
13rm -r tests/ui/{extern/,unsized-locals/,lto/,linkage*} || true
14for test in $(rg --files-with-matches "lto|// needs-asm-support|// needs-unwind" tests/{ui,incremental}); do
cdc7bbd5
XL
15 rm $test
16done
17
9c376795 18for test in $(rg -i --files-with-matches "//(\[\w+\])?~[^\|]*\s*ERR|// error-pattern:|// build-fail|// run-fail|-Cllvm-args" tests/ui); do
cdc7bbd5
XL
19 rm $test
20done
21
9c376795
FG
22git checkout -- tests/ui/issues/auxiliary/issue-3136-a.rs # contains //~ERROR, but shouldn't be removed
23git checkout -- tests/ui/proc-macro/pretty-print-hack/
cdc7bbd5 24
5e7ed085
FG
25# missing features
26# ================
27
28# requires stack unwinding
9c376795
FG
29rm tests/incremental/change_crate_dep_kind.rs
30rm tests/incremental/issue-80691-bad-eval-cache.rs # -Cpanic=abort causes abort instead of exit(101)
cdc7bbd5 31
5e7ed085 32# requires compiling with -Cpanic=unwind
9c376795
FG
33rm -r tests/ui/macros/rfc-2011-nicer-assert-messages/
34rm -r tests/run-make/test-benches
5e7ed085
FG
35
36# vendor intrinsics
9c376795
FG
37rm tests/ui/sse2.rs # cpuid not supported, so sse2 not detected
38rm tests/ui/intrinsics/const-eval-select-x86_64.rs # requires x86_64 vendor intrinsics
39rm tests/ui/simd/array-type.rs # "Index argument for `simd_insert` is not a constant"
40rm tests/ui/simd/intrinsic/generic-bitmask-pass.rs # simd_bitmask unimplemented
41rm tests/ui/simd/intrinsic/generic-as.rs # simd_as unimplemented
42rm tests/ui/simd/intrinsic/generic-arithmetic-saturating-pass.rs # simd_saturating_add unimplemented
43rm tests/ui/simd/intrinsic/float-math-pass.rs # simd_fcos unimplemented
44rm tests/ui/simd/intrinsic/generic-gather-pass.rs # simd_gather unimplemented
45rm tests/ui/simd/intrinsic/generic-select-pass.rs # simd_select_bitmask unimplemented
46rm tests/ui/simd/issue-85915-simd-ptrs.rs # simd_gather unimplemented
47rm tests/ui/simd/issue-89193.rs # simd_gather unimplemented
48rm tests/ui/simd/simd-bitmask.rs # simd_bitmask unimplemented
5e7ed085
FG
49
50# exotic linkages
9c376795
FG
51rm tests/ui/issues/issue-33992.rs # unsupported linkages
52rm tests/incremental/hashes/function_interfaces.rs # same
53rm tests/incremental/hashes/statics.rs # same
5e7ed085
FG
54
55# variadic arguments
9c376795
FG
56rm tests/ui/abi/mir/mir_codegen_calls_variadic.rs # requires float varargs
57rm tests/ui/abi/variadic-ffi.rs # requires callee side vararg support
5e7ed085
FG
58
59# unsized locals
9c376795 60rm -r tests/run-pass-valgrind/unsized-locals
5e7ed085
FG
61
62# misc unimplemented things
9c376795
FG
63rm tests/ui/intrinsics/intrinsic-nearby.rs # unimplemented nearbyintf32 and nearbyintf64 intrinsics
64rm tests/ui/target-feature/missing-plusminus.rs # error not implemented
65rm tests/ui/fn/dyn-fn-alignment.rs # wants a 256 byte alignment
66rm -r tests/run-make/emit-named-files # requires full --emit support
67rm tests/ui/abi/stack-probes.rs # stack probes not yet implemented
68rm tests/ui/simd/intrinsic/ptr-cast.rs # simd_expose_addr intrinsic unimplemented
69rm -r tests/run-make/repr128-dwarf # debuginfo test
70rm tests/codegen-units/item-collection/asm-sym.rs # requires support for sym in asm!()
5e7ed085
FG
71
72# optimization tests
73# ==================
9c376795
FG
74rm tests/ui/codegen/issue-28950.rs # depends on stack size optimizations
75rm tests/ui/codegen/init-large-type.rs # same
76rm tests/ui/issues/issue-40883.rs # same
77rm -r tests/run-make/fmt-write-bloat/ # tests an optimization
5e7ed085
FG
78
79# backend specific tests
80# ======================
9c376795
FG
81rm tests/incremental/thinlto/cgu_invalidated_when_import_{added,removed}.rs # requires LLVM
82rm tests/ui/abi/stack-protector.rs # requires stack protector support
5e7ed085
FG
83
84# giving different but possibly correct results
85# =============================================
9c376795
FG
86rm tests/ui/mir/mir_misc_casts.rs # depends on deduplication of constants
87rm tests/ui/mir/mir_raw_fat_ptr.rs # same
88rm tests/ui/consts/issue-33537.rs # same
89rm tests/ui/layout/valid_range_oob.rs # different ICE message
cdc7bbd5 90
5e7ed085
FG
91# doesn't work due to the way the rustc test suite is invoked.
92# should work when using ./x.py test the way it is intended
93# ============================================================
9c376795
FG
94rm -r tests/run-make/emit-shared-files # requires the rustdoc executable in dist/bin/
95rm -r tests/run-make/unstable-flag-required # same
96rm -r tests/run-make/rustdoc-* # same
97rm -r tests/run-make/issue-88756-default-output # same
98rm -r tests/run-make/remap-path-prefix-dwarf # requires llvm-dwarfdump
99rm -r tests/ui/consts/missing_span_in_backtrace.rs # expects sysroot source to be elsewhere
cdc7bbd5 100
5e7ed085
FG
101# genuine bugs
102# ============
9c376795
FG
103rm tests/incremental/spike-neg1.rs # errors out for some reason
104rm tests/incremental/spike-neg2.rs # same
105rm tests/ui/issues/issue-74564-if-expr-stack-overflow.rs # gives a stackoverflow before the backend runs
106rm tests/ui/mir/ssa-analysis-regression-50041.rs # produces ICE
107rm tests/ui/type-alias-impl-trait/assoc-projection-ice.rs # produces ICE
cdc7bbd5 108
9c376795 109rm tests/ui/simd/intrinsic/generic-reduction-pass.rs # simd_reduce_add_unordered doesn't accept an accumulator for integer vectors
a2a8927a 110
9c376795 111rm tests/ui/runtime/out-of-stack.rs # SIGSEGV instead of SIGABRT for some reason (#1301)
5e7ed085
FG
112
113# bugs in the test suite
114# ======================
9c376795
FG
115rm tests/ui/backtrace.rs # TODO warning
116rm tests/ui/simple_global_asm.rs # TODO add needs-asm-support
117rm tests/ui/test-attrs/test-type.rs # TODO panic message on stderr. correct stdout
064997fb 118# not sure if this is actually a bug in the test suite, but the symbol list shows the function without leading _ for some reason
9c376795
FG
119rm -r tests/run-make/native-link-modifier-bundle
120rm tests/ui/process/nofile-limit.rs # TODO some AArch64 linking issue
121rm tests/ui/dyn-star/dispatch-on-pin-mut.rs # TODO failed assertion in vtable::get_ptr_and_method_ref
a2a8927a 122
9c376795 123rm tests/ui/stdio-is-blocking.rs # really slow with unoptimized libstd
2b03887a 124
cdc7bbd5 125echo "[TEST] rustc test suite"
9c376795 126RUST_TEST_NOCAPTURE=1 COMPILETEST_FORCE_STAGE0=1 ./x.py test --stage 0 tests/{codegen-units,run-make,run-pass-valgrind,ui,incremental}
cdc7bbd5 127popd