2022-04-14 07:18:13 -05:00
|
|
|
#!/usr/bin/env bash
|
2021-03-15 08:49:57 -05:00
|
|
|
set -e
|
|
|
|
|
|
|
|
cd $(dirname "$0")/../
|
|
|
|
|
|
|
|
source ./scripts/setup_rust_fork.sh
|
|
|
|
|
|
|
|
echo "[TEST] Test suite of rustc"
|
|
|
|
pushd rust
|
|
|
|
|
2022-02-06 08:13:29 -06:00
|
|
|
command -v rg >/dev/null 2>&1 || cargo install ripgrep
|
2021-03-15 08:49:57 -05:00
|
|
|
|
2022-03-19 10:32:07 -05:00
|
|
|
rm -r src/test/ui/{extern/,unsized-locals/,lto/,linkage*} || true
|
2022-03-22 06:35:49 -05:00
|
|
|
for test in $(rg --files-with-matches "lto|// needs-asm-support|// needs-unwind" src/test/{ui,incremental}); do
|
2021-03-15 08:49:57 -05:00
|
|
|
rm $test
|
|
|
|
done
|
|
|
|
|
2022-03-18 09:38:58 -05:00
|
|
|
for test in $(rg -i --files-with-matches "//(\[\w+\])?~[^\|]*\s*ERR|// error-pattern:|// build-fail|// run-fail|-Cllvm-args" src/test/ui); do
|
2021-03-15 08:49:57 -05:00
|
|
|
rm $test
|
|
|
|
done
|
|
|
|
|
|
|
|
git checkout -- src/test/ui/issues/auxiliary/issue-3136-a.rs # contains //~ERROR, but shouldn't be removed
|
2022-11-03 06:55:06 -05:00
|
|
|
git checkout -- src/test/ui/proc-macro/pretty-print-hack/
|
2021-03-15 08:49:57 -05:00
|
|
|
|
2022-03-18 10:38:28 -05:00
|
|
|
# missing features
|
|
|
|
# ================
|
|
|
|
|
|
|
|
# requires stack unwinding
|
2021-07-02 04:32:27 -05:00
|
|
|
rm src/test/incremental/change_crate_dep_kind.rs
|
2022-03-19 09:48:19 -05:00
|
|
|
rm src/test/incremental/issue-80691-bad-eval-cache.rs # -Cpanic=abort causes abort instead of exit(101)
|
2021-03-15 08:49:57 -05:00
|
|
|
|
2022-03-18 10:38:28 -05:00
|
|
|
# requires compiling with -Cpanic=unwind
|
2022-06-23 09:32:08 -05:00
|
|
|
rm -r src/test/ui/macros/rfc-2011-nicer-assert-messages/
|
2022-11-03 06:55:06 -05:00
|
|
|
rm -r src/test/run-make/test-benches
|
2022-03-18 10:38:28 -05:00
|
|
|
|
|
|
|
# vendor intrinsics
|
2021-03-15 08:49:57 -05:00
|
|
|
rm src/test/ui/sse2.rs # cpuid not supported, so sse2 not detected
|
2022-03-18 10:38:28 -05:00
|
|
|
rm src/test/ui/intrinsics/const-eval-select-x86_64.rs # requires x86_64 vendor intrinsics
|
2022-03-19 10:32:07 -05:00
|
|
|
rm src/test/ui/simd/array-type.rs # "Index argument for `simd_insert` is not a constant"
|
|
|
|
rm src/test/ui/simd/intrinsic/float-math-pass.rs # simd_fcos unimplemented
|
2022-03-18 10:38:28 -05:00
|
|
|
|
|
|
|
# exotic linkages
|
2021-03-15 08:49:57 -05:00
|
|
|
rm src/test/ui/issues/issue-33992.rs # unsupported linkages
|
2021-12-26 07:11:09 -06:00
|
|
|
rm src/test/incremental/hashes/function_interfaces.rs # same
|
|
|
|
rm src/test/incremental/hashes/statics.rs # same
|
2022-03-18 10:38:28 -05:00
|
|
|
|
|
|
|
# variadic arguments
|
|
|
|
rm src/test/ui/abi/mir/mir_codegen_calls_variadic.rs # requires float varargs
|
|
|
|
rm src/test/ui/abi/variadic-ffi.rs # requires callee side vararg support
|
|
|
|
|
|
|
|
# unsized locals
|
|
|
|
rm -r src/test/run-pass-valgrind/unsized-locals
|
|
|
|
|
|
|
|
# misc unimplemented things
|
|
|
|
rm src/test/ui/intrinsics/intrinsic-nearby.rs # unimplemented nearbyintf32 and nearbyintf64 intrinsics
|
|
|
|
rm src/test/ui/target-feature/missing-plusminus.rs # error not implemented
|
|
|
|
rm src/test/ui/fn/dyn-fn-alignment.rs # wants a 256 byte alignment
|
|
|
|
rm -r src/test/run-make/emit-named-files # requires full --emit support
|
2022-07-03 08:41:29 -05:00
|
|
|
rm src/test/ui/abi/stack-probes.rs # stack probes not yet implemented
|
2022-09-25 09:06:07 -05:00
|
|
|
rm src/test/ui/simd/intrinsic/ptr-cast.rs # simd_expose_addr intrinsic unimplemented
|
2022-11-22 13:29:06 -06:00
|
|
|
rm -r src/test/run-make/repr128-dwarf # debuginfo test
|
2022-12-11 04:56:34 -06:00
|
|
|
rm src/test/codegen-units/item-collection/asm-sym.rs # requires support for sym in asm!()
|
2022-03-18 10:38:28 -05:00
|
|
|
|
|
|
|
# optimization tests
|
|
|
|
# ==================
|
2022-06-23 09:32:08 -05:00
|
|
|
rm src/test/ui/codegen/issue-28950.rs # depends on stack size optimizations
|
2022-03-18 10:38:28 -05:00
|
|
|
rm src/test/ui/codegen/init-large-type.rs # same
|
2022-07-03 08:41:29 -05:00
|
|
|
rm src/test/ui/issues/issue-40883.rs # same
|
2022-03-18 10:38:28 -05:00
|
|
|
rm -r src/test/run-make/fmt-write-bloat/ # tests an optimization
|
|
|
|
|
|
|
|
# backend specific tests
|
|
|
|
# ======================
|
|
|
|
rm src/test/incremental/thinlto/cgu_invalidated_when_import_{added,removed}.rs # requires LLVM
|
|
|
|
rm src/test/ui/abi/stack-protector.rs # requires stack protector support
|
|
|
|
|
|
|
|
# giving different but possibly correct results
|
|
|
|
# =============================================
|
2021-03-15 08:49:57 -05:00
|
|
|
rm src/test/ui/mir/mir_misc_casts.rs # depends on deduplication of constants
|
|
|
|
rm src/test/ui/mir/mir_raw_fat_ptr.rs # same
|
2021-04-08 05:08:13 -05:00
|
|
|
rm src/test/ui/consts/issue-33537.rs # same
|
2022-12-11 04:56:34 -06:00
|
|
|
rm src/test/ui/layout/valid_range_oob.rs # different ICE message
|
2021-03-15 08:49:57 -05:00
|
|
|
|
2022-03-19 09:48:19 -05:00
|
|
|
# doesn't work due to the way the rustc test suite is invoked.
|
|
|
|
# should work when using ./x.py test the way it is intended
|
|
|
|
# ============================================================
|
2022-11-28 07:01:49 -06:00
|
|
|
rm -r src/test/run-make/emit-shared-files # requires the rustdoc executable in dist/bin/
|
2021-04-16 05:35:22 -05:00
|
|
|
rm -r src/test/run-make/unstable-flag-required # same
|
2021-12-16 07:36:02 -06:00
|
|
|
rm -r src/test/run-make/rustdoc-* # same
|
2022-07-03 08:41:29 -05:00
|
|
|
rm -r src/test/run-make/issue-88756-default-output # same
|
2022-06-09 09:56:53 -05:00
|
|
|
rm -r src/test/run-make/remap-path-prefix-dwarf # requires llvm-dwarfdump
|
2022-12-11 04:56:34 -06:00
|
|
|
rm -r src/test/ui/consts/missing_span_in_backtrace.rs # expects sysroot source to be elsewhere
|
2021-03-15 08:49:57 -05:00
|
|
|
|
2022-03-18 10:38:28 -05:00
|
|
|
# genuine bugs
|
|
|
|
# ============
|
2021-12-26 07:11:09 -06:00
|
|
|
rm src/test/incremental/spike-neg1.rs # errors out for some reason
|
|
|
|
rm src/test/incremental/spike-neg2.rs # same
|
|
|
|
|
2022-03-19 10:32:07 -05:00
|
|
|
rm src/test/ui/simd/intrinsic/generic-reduction-pass.rs # simd_reduce_add_unordered doesn't accept an accumulator for integer vectors
|
|
|
|
|
2022-12-16 07:29:26 -06:00
|
|
|
rm src/test/ui/simd/intrinsic/generic-as.rs # crash when accessing vector type filed (#1318)
|
|
|
|
rm src/test/ui/simd/simd-bitmask.rs # crash
|
2022-12-01 08:40:48 -06:00
|
|
|
|
2022-03-18 10:38:28 -05:00
|
|
|
# bugs in the test suite
|
|
|
|
# ======================
|
2022-03-22 06:35:49 -05:00
|
|
|
rm src/test/ui/backtrace.rs # TODO warning
|
|
|
|
rm src/test/ui/simple_global_asm.rs # TODO add needs-asm-support
|
|
|
|
rm src/test/ui/test-attrs/test-type.rs # TODO panic message on stderr. correct stdout
|
2022-07-18 06:57:22 -05:00
|
|
|
# not sure if this is actually a bug in the test suite, but the symbol list shows the function without leading _ for some reason
|
|
|
|
rm -r src/test/run-make/native-link-modifier-bundle
|
2022-11-03 06:55:06 -05:00
|
|
|
rm src/test/ui/process/nofile-limit.rs # TODO some AArch64 linking issue
|
2022-12-11 04:56:34 -06:00
|
|
|
rm src/test/ui/dyn-star/dispatch-on-pin-mut.rs # TODO failed assertion in vtable::get_ptr_and_method_ref
|
2022-03-18 09:38:58 -05:00
|
|
|
|
2022-09-15 11:14:29 -05:00
|
|
|
rm src/test/ui/stdio-is-blocking.rs # really slow with unoptimized libstd
|
|
|
|
|
2021-03-15 08:49:57 -05:00
|
|
|
echo "[TEST] rustc test suite"
|
2021-12-26 07:11:09 -06:00
|
|
|
RUST_TEST_NOCAPTURE=1 COMPILETEST_FORCE_STAGE0=1 ./x.py test --stage 0 src/test/{codegen-units,run-make,run-pass-valgrind,ui,incremental}
|
2021-03-15 08:49:57 -05:00
|
|
|
popd
|