Skip to content

Commit db14a52

Browse files
committed
add the --sequential flag to compiletest
1 parent 02869e3 commit db14a52

File tree

1 file changed

+9
-1
lines changed
  • src/tools/remote-test-server/src

1 file changed

+9
-1
lines changed

Diff for: src/tools/remote-test-server/src/main.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@ static TEST: AtomicUsize = AtomicUsize::new(0);
4343
#[derive(Copy, Clone)]
4444
struct Config {
4545
verbose: bool,
46+
sequential: bool,
4647
bind: SocketAddr,
4748
}
4849

4950
impl Config {
5051
pub fn default() -> Config {
5152
Config {
5253
verbose: false,
54+
sequential: false,
5355
bind: if cfg!(target_os = "android") || cfg!(windows) {
5456
([0, 0, 0, 0], 12345).into()
5557
} else {
@@ -70,6 +72,7 @@ impl Config {
7072
next_is_bind = false;
7173
}
7274
"--bind" => next_is_bind = true,
75+
"--sequential" => config.sequential = true,
7376
"--verbose" | "-v" => config.verbose = true,
7477
arg => panic!("unknown argument: {}", arg),
7578
}
@@ -125,7 +128,12 @@ fn main() {
125128
let lock = lock.clone();
126129
let work = work.clone();
127130
let tmp = tmp.clone();
128-
thread::spawn(move || handle_run(socket, &work, &tmp, &lock, config));
131+
let f = move || handle_run(socket, &work, &tmp, &lock, config);
132+
if config.sequential {
133+
f();
134+
} else {
135+
thread::spawn(f);
136+
}
129137
} else {
130138
panic!("unknown command {:?}", buf);
131139
}

0 commit comments

Comments
 (0)