Skip to content

Commit db3886b

Browse files
committed
Deny compiletest self-tests being run against stage 0 rustc unless explicitly allowed
Otherwise, `compiletest` would have to know e.g. how to parse two different target spec, if target spec format was changed between beta `rustc` and in-tree `rustc`.
1 parent 93ad395 commit db3886b

File tree

1 file changed

+9
-1
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+9
-1
lines changed

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ use std::ffi::{OsStr, OsString};
88
use std::path::{Path, PathBuf};
99
use std::{env, fs, iter};
1010

11+
#[cfg(feature = "tracing")]
12+
use tracing::instrument;
13+
1114
use crate::core::build_steps::compile::{Std, run_cargo};
1215
use crate::core::build_steps::doc::DocumentationFormat;
1316
use crate::core::build_steps::gcc::{Gcc, add_cg_gcc_cargo_flags};
@@ -30,7 +33,7 @@ use crate::utils::helpers::{
3033
linker_flags, t, target_supports_cranelift_backend, up_to_date,
3134
};
3235
use crate::utils::render_tests::{add_flags_and_try_run_tests, try_run_tests};
33-
use crate::{CLang, DocTests, GitRepo, Mode, PathSet, envify};
36+
use crate::{CLang, DocTests, GitRepo, Mode, PathSet, debug, envify};
3437

3538
const ADB_TEST_DIR: &str = "/data/local/tmp/work";
3639

@@ -713,6 +716,10 @@ impl Step for CompiletestTest {
713716
}
714717

715718
/// Runs `cargo test` for compiletest.
719+
#[cfg_attr(
720+
feature = "tracing",
721+
instrument(level = "debug", name = "CompiletestTest::run", skip_all)
722+
)]
716723
fn run(self, builder: &Builder<'_>) {
717724
let host = self.host;
718725

@@ -725,6 +732,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
725732
}
726733

727734
let compiler = builder.compiler(builder.top_stage, host);
735+
debug!(?compiler);
728736

729737
// We need `ToolStd` for the locally-built sysroot because
730738
// compiletest uses unstable features of the `test` crate.

0 commit comments

Comments
 (0)