From 8985e5ee825a2fb1e5eb2050f0b3fd8e2913d322 Mon Sep 17 00:00:00 2001 From: The 8472 Date: Tue, 28 Dec 2021 19:05:03 +0100 Subject: Override rustc version in ui and mir-opt tests to get stable hashes Building a dozen separate regexps for each test in compiletest consumes significant amounts of CPU cycles. Using `RUSTC_FORCE_INCR_COMP_ARTIFACT_HEADER` stabilizes hashes calcuated for the individual tests so no test-dependent normalization is needed. Hashes for the standard library still change so some normalizations are still needed. --- src/bootstrap/test.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/bootstrap') diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index cb1b0ebf8db..176c06114e0 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1540,6 +1540,9 @@ note: if you're sure you want to do this, please open an issue as to why. In the } } cmd.env("RUSTC_BOOTSTRAP", "1"); + // Override the rustc version used in symbol hashes to reduce the amount of normalization + // needed when diffing test output. + cmd.env("RUSTC_FORCE_RUSTC_VERSION", "compiletest"); cmd.env("DOC_RUST_LANG_ORG_CHANNEL", builder.doc_rust_lang_org_channel()); builder.add_rust_test_threads(&mut cmd); -- cgit 1.4.1-3-g733a5