]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh
Auto merge of #106938 - GuillaumeGomez:normalize-projection-field-ty, r=oli-obk
[rust.git] / compiler / rustc_codegen_cranelift / scripts / test_rustc_tests.sh
1 #!/usr/bin/env bash
2 set -e
3
4 cd $(dirname "$0")/../
5
6 source ./scripts/setup_rust_fork.sh
7
8 echo "[TEST] Test suite of rustc"
9 pushd rust
10
11 command -v rg >/dev/null 2>&1 || cargo install ripgrep
12
13 rm -r tests/ui/{extern/,unsized-locals/,lto/,linkage*} || true
14 for test in $(rg --files-with-matches "lto|// needs-asm-support|// needs-unwind" tests/{codegen-units,ui,incremental}); do
15   rm $test
16 done
17
18 for test in $(rg -i --files-with-matches "//(\[\w+\])?~[^\|]*\s*ERR|// error-pattern:|// build-fail|// run-fail|-Cllvm-args" tests/ui); do
19   rm $test
20 done
21
22 git checkout -- tests/ui/issues/auxiliary/issue-3136-a.rs # contains //~ERROR, but shouldn't be removed
23 git checkout -- tests/ui/proc-macro/pretty-print-hack/
24
25 # missing features
26 # ================
27
28 # requires stack unwinding
29 rm tests/incremental/change_crate_dep_kind.rs
30 rm tests/incremental/issue-80691-bad-eval-cache.rs # -Cpanic=abort causes abort instead of exit(101)
31
32 # requires compiling with -Cpanic=unwind
33 rm -r tests/ui/macros/rfc-2011-nicer-assert-messages/
34 rm -r tests/run-make/test-benches
35 rm tests/ui/test-attrs/test-type.rs
36
37 # vendor intrinsics
38 rm tests/ui/sse2.rs # cpuid not supported, so sse2 not detected
39 rm tests/ui/intrinsics/const-eval-select-x86_64.rs # requires x86_64 vendor intrinsics
40 rm tests/ui/simd/array-type.rs # "Index argument for `simd_insert` is not a constant"
41 rm tests/ui/simd/intrinsic/float-math-pass.rs # simd_fcos unimplemented
42
43 # exotic linkages
44 rm tests/ui/issues/issue-33992.rs # unsupported linkages
45 rm tests/incremental/hashes/function_interfaces.rs # same
46 rm tests/incremental/hashes/statics.rs # same
47
48 # variadic arguments
49 rm tests/ui/abi/mir/mir_codegen_calls_variadic.rs # requires float varargs
50 rm tests/ui/abi/variadic-ffi.rs # requires callee side vararg support
51
52 # unsized locals
53 rm -r tests/run-pass-valgrind/unsized-locals
54
55 # misc unimplemented things
56 rm tests/ui/intrinsics/intrinsic-nearby.rs # unimplemented nearbyintf32 and nearbyintf64 intrinsics
57 rm tests/ui/target-feature/missing-plusminus.rs # error not implemented
58 rm tests/ui/fn/dyn-fn-alignment.rs # wants a 256 byte alignment
59 rm -r tests/run-make/emit-named-files # requires full --emit support
60 rm -r tests/run-make/repr128-dwarf # debuginfo test
61
62 # optimization tests
63 # ==================
64 rm tests/ui/codegen/issue-28950.rs # depends on stack size optimizations
65 rm tests/ui/codegen/init-large-type.rs # same
66 rm tests/ui/issues/issue-40883.rs # same
67 rm -r tests/run-make/fmt-write-bloat/ # tests an optimization
68
69 # backend specific tests
70 # ======================
71 rm tests/incremental/thinlto/cgu_invalidated_when_import_{added,removed}.rs # requires LLVM
72 rm tests/ui/abi/stack-protector.rs # requires stack protector support
73
74 # giving different but possibly correct results
75 # =============================================
76 rm tests/ui/mir/mir_misc_casts.rs # depends on deduplication of constants
77 rm tests/ui/mir/mir_raw_fat_ptr.rs # same
78 rm tests/ui/consts/issue-33537.rs # same
79 rm tests/ui/layout/valid_range_oob.rs # different ICE message
80
81 rm tests/ui/consts/issue-miri-1910.rs # different error message
82 rm tests/ui/consts/offset_ub.rs # same
83 rm tests/ui/intrinsics/panic-uninitialized-zeroed.rs # same
84 rm tests/ui/lint/lint-const-item-mutation.rs # same
85 rm tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.rs # same
86 rm tests/ui/suggestions/derive-trait-for-method-call.rs # same
87 rm tests/ui/typeck/issue-46112.rs # same
88
89 rm tests/ui/proc-macro/crt-static.rs # extra warning about -Cpanic=abort for proc macros
90 rm tests/ui/proc-macro/proc-macro-deprecated-attr.rs # same
91 rm tests/ui/proc-macro/quote-debug.rs # same
92 rm tests/ui/proc-macro/no-missing-docs.rs # same
93 rm tests/ui/rust-2018/proc-macro-crate-in-paths.rs # same
94
95 # doesn't work due to the way the rustc test suite is invoked.
96 # should work when using ./x.py test the way it is intended
97 # ============================================================
98 rm -r tests/run-make/emit-shared-files # requires the rustdoc executable in dist/bin/
99 rm -r tests/run-make/unstable-flag-required # same
100 rm -r tests/run-make/rustdoc-* # same
101 rm -r tests/run-make/issue-88756-default-output # same
102 rm -r tests/run-make/remap-path-prefix-dwarf # requires llvm-dwarfdump
103 rm -r tests/ui/consts/missing_span_in_backtrace.rs # expects sysroot source to be elsewhere
104
105 # genuine bugs
106 # ============
107 rm tests/incremental/spike-neg1.rs # errors out for some reason
108 rm tests/incremental/spike-neg2.rs # same
109
110 rm tests/ui/simd/intrinsic/generic-reduction-pass.rs # simd_reduce_add_unordered doesn't accept an accumulator for integer vectors
111
112 rm tests/ui/simd/intrinsic/generic-as.rs # crash when accessing vector type filed (#1318)
113 rm tests/ui/simd/simd-bitmask.rs # crash
114
115 rm tests/ui/dyn-star/dyn-star-to-dyn.rs
116 rm tests/ui/dyn-star/dispatch-on-pin-mut.rs
117
118 # bugs in the test suite
119 # ======================
120 rm tests/ui/backtrace.rs # TODO warning
121 rm tests/ui/simple_global_asm.rs # TODO add needs-asm-support
122 rm tests/ui/process/nofile-limit.rs # TODO some AArch64 linking issue
123
124 rm tests/ui/stdio-is-blocking.rs # really slow with unoptimized libstd
125
126 echo "[TEST] rustc test suite"
127 RUST_TEST_NOCAPTURE=1 COMPILETEST_FORCE_STAGE0=1 ./x.py test --stage 0 tests/{codegen-units,run-make,run-pass-valgrind,ui,incremental}
128 popd