Skip to content

Commit 7e0ad11

Browse files
committed
fix: Prevent parallel test execution for busybox_ar_fallback
Add serial_test dependency and use #[serial] attribute to ensure the busybox_ar_fallback test runs serially, not in parallel with other tests. This prevents cross-contamination where the custom ar/ranlib scripts from this test interfere with other tests running concurrently in CI. Fixes CI failures where tests tried to write to directories belonging to other test instances.
1 parent 6b66492 commit 7e0ad11

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobserver = []
3737

3838
[dev-dependencies]
3939
tempfile = "3"
40+
serial_test = "3"
4041

4142
[workspace]
4243
members = [

tests/busybox_ar_fallback.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
#![allow(clippy::disallowed_methods)]
55

66
use crate::support::Test;
7+
use serial_test::serial;
78

89
mod support;
910

1011
#[test]
12+
#[serial]
1113
fn busybox_ar_fallback() {
1214
// Use standard test setup with proper cc-shim
1315
let test = Test::gnu();

tests/cflags.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
mod support;
44

55
use crate::support::Test;
6+
use serial_test::serial;
67
use std::env;
78

89
#[test]
10+
#[serial]
911
fn cflags() {
1012
gnu_no_warnings_if_cflags();
1113
cflags_order();

0 commit comments

Comments
 (0)