Skip to content

Commit 64b30d3

Browse files
committed
Merge branch 'master' into sync_from_rust_2024_12_11
2 parents f0d9b56 + 184d63d commit 64b30d3

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313

1414
jobs:
1515
build:
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-22.04
1717

1818
strategy:
1919
fail-fast: false

build_system/src/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ fn test_projects(env: &Env, args: &TestArg) -> Result<(), String> {
641641
//failing test is fixed upstream.
642642
//"https://github.com/marshallpierce/rust-base64", // FIXME: one test is OOM-killed.
643643
// TODO: ignore the base64 test that is OOM-killed.
644-
"https://github.com/time-rs/time",
644+
//"https://github.com/time-rs/time", // FIXME: one test fails (https://github.com/time-rs/time/issues/719).
645645
"https://github.com/rust-lang/log",
646646
"https://github.com/bitflags/bitflags",
647647
//"https://github.com/serde-rs/serde", // FIXME: one test fails.

tests/lang_tests_common.rs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,20 @@ pub fn main_inner(profile: Profile) {
2222
let tempdir = TempDir::new().expect("temp dir");
2323
let current_dir = current_dir().expect("current dir");
2424
let current_dir = current_dir.to_str().expect("current dir").to_string();
25-
let toml = Toml::parse(include_str!("../config.toml")).expect("Failed to parse `config.toml`");
26-
let gcc_path = if let Ok(gcc_path) = toml.get_string("gcc-path") {
27-
PathBuf::from(gcc_path.to_string())
28-
} else {
29-
// then we try to retrieve it from the `target` folder.
30-
let commit = include_str!("../libgccjit.version").trim();
31-
Path::new("build/libgccjit").join(commit)
32-
};
25+
26+
let manifest_dir = Path::new(env!("CARGO_MANIFEST_DIR"));
27+
28+
let gcc_path = std::fs::read_to_string(manifest_dir.join("config.toml"))
29+
.ok()
30+
.and_then(|v| {
31+
let toml = Toml::parse(&v).expect("Failed to parse `config.toml`");
32+
toml.get_string("gcc-path").map(PathBuf::from).ok()
33+
})
34+
.unwrap_or_else(|| {
35+
// then we try to retrieve it from the `target` folder.
36+
let commit = include_str!("../libgccjit.version").trim();
37+
Path::new("build/libgccjit").join(commit)
38+
});
3339

3440
let gcc_path = Path::new(&gcc_path)
3541
.canonicalize()

0 commit comments

Comments
 (0)