Skip to content

Commit c2a85f7

Browse files
committed
set BOOTSTRAP_SKIP_TARGET_SANITY in opt-dist before running tests
opt-dist overrides the stage 0 compiler with previously compiled compilers, which can cause confusion in bootstrap's target sanity checks. It is best to skip that check. Signed-off-by: onur-ozkan <[email protected]>
1 parent f7694b8 commit c2a85f7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/tools/opt-dist/src/tests.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,13 @@ llvm-config = "{llvm_config}"
102102
for test_path in env.skipped_tests() {
103103
args.extend(["--skip", test_path]);
104104
}
105-
cmd(&args).env("COMPILETEST_FORCE_STAGE0", "1").run().context("Cannot execute tests")
105+
cmd(&args)
106+
.env("COMPILETEST_FORCE_STAGE0", "1")
107+
// Above we override the stage 0 compiler with previously compiled compiler,
108+
// which can cause confusion in bootstrap's target sanity checks.
109+
.env("BOOTSTRAP_SKIP_TARGET_SANITY", "1")
110+
.run()
111+
.context("Cannot execute tests")
106112
}
107113

108114
/// Tries to find the version of the dist artifacts (either nightly, beta, or 1.XY.Z).

0 commit comments

Comments
 (0)