1
Fork 0

Merge commit '49cd5dd454' into sync_cg_clif-2024-06-30

This commit is contained in:
bjorn3 2024-06-30 11:28:14 +00:00
commit 9ec6a02ab3
23 changed files with 441 additions and 292 deletions

View file

@ -329,7 +329,6 @@ pub(crate) fn run_tests(
struct TestRunner<'a> {
is_native: bool,
jit_supported: bool,
use_unstable_features: bool,
skip_tests: &'a [&'a str],
dirs: Dirs,
target_compiler: Compiler,
@ -361,15 +360,7 @@ impl<'a> TestRunner<'a> {
&& target_compiler.triple.contains("x86_64")
&& !target_compiler.triple.contains("windows");
Self {
is_native,
jit_supported,
use_unstable_features,
skip_tests,
dirs,
target_compiler,
stdlib_source,
}
Self { is_native, jit_supported, skip_tests, dirs, target_compiler, stdlib_source }
}
fn run_testsuite(&self, tests: &[TestCase]) {
@ -393,31 +384,13 @@ impl<'a> TestRunner<'a> {
match *cmd {
TestCaseCmd::Custom { func } => func(self),
TestCaseCmd::BuildLib { source, crate_types } => {
if self.use_unstable_features {
self.run_rustc([source, "--crate-type", crate_types]);
} else {
self.run_rustc([
source,
"--crate-type",
crate_types,
"--cfg",
"no_unstable_features",
]);
}
self.run_rustc([source, "--crate-type", crate_types]);
}
TestCaseCmd::BuildBin { source } => {
if self.use_unstable_features {
self.run_rustc([source]);
} else {
self.run_rustc([source, "--cfg", "no_unstable_features"]);
}
self.run_rustc([source]);
}
TestCaseCmd::BuildBinAndRun { source, args } => {
if self.use_unstable_features {
self.run_rustc([source]);
} else {
self.run_rustc([source, "--cfg", "no_unstable_features"]);
}
self.run_rustc([source]);
self.run_out_command(
source.split('/').last().unwrap().split('.').next().unwrap(),
args,
@ -472,7 +445,6 @@ impl<'a> TestRunner<'a> {
cmd.arg(&self.target_compiler.triple);
cmd.arg("-Cpanic=abort");
cmd.arg("-Zunstable-options");
cmd.arg("--check-cfg=cfg(no_unstable_features)");
cmd.arg("--check-cfg=cfg(jit)");
cmd.args(args);
cmd