diff options
| author | Antoni Boucher <bouanto@zoho.com> | 2024-12-14 10:41:41 -0500 |
|---|---|---|
| committer | Antoni Boucher <bouanto@zoho.com> | 2024-12-14 10:41:41 -0500 |
| commit | 64b30d344ce54f8ee496cb3590b4c7cf3cb30447 (patch) | |
| tree | f5830ee52644601f7f97bd5985c19cc2d9862d99 | |
| parent | f0d9b56e7287416b4c0a537c9a5ff50e48051ca0 (diff) | |
| parent | 184d63de965dabe5b969c91f01c9f6c309b8de16 (diff) | |
| download | rust-64b30d344ce54f8ee496cb3590b4c7cf3cb30447.tar.gz rust-64b30d344ce54f8ee496cb3590b4c7cf3cb30447.zip | |
Merge branch 'master' into sync_from_rust_2024_12_11
| -rw-r--r-- | .github/workflows/release.yml | 2 | ||||
| -rw-r--r-- | build_system/src/test.rs | 2 | ||||
| -rw-r--r-- | tests/lang_tests_common.rs | 22 |
3 files changed, 16 insertions, 10 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d5c06a836db..f0ff23cf0f8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ env: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: fail-fast: false diff --git a/build_system/src/test.rs b/build_system/src/test.rs index 5c06ed65747..701584e24b2 100644 --- a/build_system/src/test.rs +++ b/build_system/src/test.rs @@ -641,7 +641,7 @@ fn test_projects(env: &Env, args: &TestArg) -> Result<(), String> { //failing test is fixed upstream. //"https://github.com/marshallpierce/rust-base64", // FIXME: one test is OOM-killed. // TODO: ignore the base64 test that is OOM-killed. - "https://github.com/time-rs/time", + //"https://github.com/time-rs/time", // FIXME: one test fails (https://github.com/time-rs/time/issues/719). "https://github.com/rust-lang/log", "https://github.com/bitflags/bitflags", //"https://github.com/serde-rs/serde", // FIXME: one test fails. diff --git a/tests/lang_tests_common.rs b/tests/lang_tests_common.rs index aecea37ab5a..433b3d680b5 100644 --- a/tests/lang_tests_common.rs +++ b/tests/lang_tests_common.rs @@ -22,14 +22,20 @@ pub fn main_inner(profile: Profile) { let tempdir = TempDir::new().expect("temp dir"); let current_dir = current_dir().expect("current dir"); let current_dir = current_dir.to_str().expect("current dir").to_string(); - let toml = Toml::parse(include_str!("../config.toml")).expect("Failed to parse `config.toml`"); - let gcc_path = if let Ok(gcc_path) = toml.get_string("gcc-path") { - PathBuf::from(gcc_path.to_string()) - } else { - // then we try to retrieve it from the `target` folder. - let commit = include_str!("../libgccjit.version").trim(); - Path::new("build/libgccjit").join(commit) - }; + + let manifest_dir = Path::new(env!("CARGO_MANIFEST_DIR")); + + let gcc_path = std::fs::read_to_string(manifest_dir.join("config.toml")) + .ok() + .and_then(|v| { + let toml = Toml::parse(&v).expect("Failed to parse `config.toml`"); + toml.get_string("gcc-path").map(PathBuf::from).ok() + }) + .unwrap_or_else(|| { + // then we try to retrieve it from the `target` folder. + let commit = include_str!("../libgccjit.version").trim(); + Path::new("build/libgccjit").join(commit) + }); let gcc_path = Path::new(&gcc_path) .canonicalize() |
