From e612cc2254e88adf959db6e1630527cda87b505b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?= <39484203+jieyouxu@users.noreply.github.com> Date: Tue, 10 Dec 2024 21:02:49 +0800 Subject: [PATCH 1/4] Fix test name typo --- ...ap.force_stable.stderr => rustc_bootstrap.force_stable.stderr} | 0 tests/ui/bootstrap/{rustc_bootstap.rs => rustc_bootstrap.rs} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename tests/ui/bootstrap/{rustc_bootstap.force_stable.stderr => rustc_bootstrap.force_stable.stderr} (100%) rename tests/ui/bootstrap/{rustc_bootstap.rs => rustc_bootstrap.rs} (100%) diff --git a/tests/ui/bootstrap/rustc_bootstap.force_stable.stderr b/tests/ui/bootstrap/rustc_bootstrap.force_stable.stderr similarity index 100% rename from tests/ui/bootstrap/rustc_bootstap.force_stable.stderr rename to tests/ui/bootstrap/rustc_bootstrap.force_stable.stderr diff --git a/tests/ui/bootstrap/rustc_bootstap.rs b/tests/ui/bootstrap/rustc_bootstrap.rs similarity index 100% rename from tests/ui/bootstrap/rustc_bootstap.rs rename to tests/ui/bootstrap/rustc_bootstrap.rs From d730a9ee8fbb1c4e0bd2c31c0bd1e9bff39136ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?= <39484203+jieyouxu@users.noreply.github.com> Date: Tue, 10 Dec 2024 21:46:41 +0800 Subject: [PATCH 2/4] [DO NOT MERGE] Log what `--channel` compiletest was told --- src/tools/compiletest/src/main.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index 2f0c7d8ddc516..8688525884620 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -18,6 +18,16 @@ fn main() { let config = Arc::new(parse_config(env::args().collect())); + eprintln!("INFO: compiletest was told channel=`{}`", config.channel); + eprintln!("INFO: rustc -vV reports:"); + eprintln!( + "{}", + String::from_utf8( + std::process::Command::new(&config.rustc_path).arg("-vV").output().unwrap().stdout + ) + .unwrap() + ); + if !config.has_html_tidy && config.mode == Mode::Rustdoc { eprintln!("warning: `tidy` (html-tidy.org) is not installed; diffs will not be generated"); } From 748a6762ce7acd861728399c6d976b0613719451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?= <39484203+jieyouxu@users.noreply.github.com> Date: Tue, 10 Dec 2024 22:05:09 +0800 Subject: [PATCH 3/4] [DO NOT MERGE] Run opt-dist tests --- src/ci/github-actions/jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index 9a51a3f4268c5..66cf78fe93230 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -79,7 +79,7 @@ envs: # - not running `opt-dist`'s post-optimization smoke tests on the resulting toolchain # # If you *want* these to happen however, temporarily uncomment it before triggering a try build. - DIST_TRY_BUILD: 1 + #DIST_TRY_BUILD: 1 auto: <<: *production From 41d70a32c69ed9cb0141cb874c46a0b4d4d1277b Mon Sep 17 00:00:00 2001 From: Jieyou Xu Date: Thu, 19 Dec 2024 21:37:18 +0800 Subject: [PATCH 4/4] opt-dist: propagate channel info to bootstrap --- src/tools/opt-dist/src/tests.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/tools/opt-dist/src/tests.rs b/src/tools/opt-dist/src/tests.rs index 887055798e00a..06ed076a86437 100644 --- a/src/tools/opt-dist/src/tests.rs +++ b/src/tools/opt-dist/src/tests.rs @@ -25,6 +25,8 @@ pub fn run_tests(env: &Environment) -> anyhow::Result<()> { let host_triple = env.host_tuple(); let version = find_dist_version(&dist_dir)?; + let channel = version_to_channel(&version); + // Extract rustc, libstd, cargo and src archives to create the optimized sysroot let rustc_dir = extract_dist_dir(&format!("rustc-{version}-{host_triple}"))?.join("rustc"); let libstd_dir = extract_dist_dir(&format!("rust-std-{version}-{host_triple}"))? @@ -61,9 +63,13 @@ pub fn run_tests(env: &Environment) -> anyhow::Result<()> { assert!(llvm_config.is_file()); let config_content = format!( - r#"profile = "user" + r#" +profile = "user" change-id = 115898 +[rust] +channel = "{channel}" + [build] rustc = "{rustc}" cargo = "{cargo}" @@ -116,3 +122,13 @@ fn find_dist_version(directory: &Utf8Path) -> anyhow::Result { archive.strip_prefix("reproducible-artifacts-").unwrap().split_once('-').unwrap(); Ok(version.to_string()) } + +/// Roughly convert a version string (`nightly`, `beta`, or `1.XY.Z`) to channel string (`nightly`, +/// `beta` or `stable`). +fn version_to_channel(version_str: &str) -> &'static str { + match version_str { + "nightly" => "nightly", + "beta" => "beta", + _ => "stable", + } +}