Skip to content

Commit d0b5b66

Browse files
committed
Add --tool=check
1 parent 7288262 commit d0b5b66

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docker/run.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ function run_build {
3333
timed inapty cargo +$TOOLCHAIN test --no-run --target=$HOST $ARGS
3434
}
3535

36+
function run_check {
37+
inapty cargo +$TOOLCHAIN check --target=$HOST $ARGS
38+
}
39+
3640
function run_asan {
3741
timed cargo +$TOOLCHAIN careful test -Zcareful-sanitizer=address --no-run --target=$HOST $ARGS &> /dev/null
3842
timed inapty cargo +$TOOLCHAIN careful test -Zcareful-sanitizer=address --color=always --no-fail-fast --target=$HOST $ARGS
@@ -59,6 +63,8 @@ do
5963
cargo +$TOOLCHAIN update &> /dev/null
6064
if [[ $TOOL == "build" ]]; then
6165
run_build
66+
elif [[ $TOOL == "check" ]]; then
67+
run_check
6268
elif [[ $TOOL == "asan" ]]; then
6369
run_asan
6470
elif [[ $TOOL == "miri" ]]; then

src/main.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ pub enum Tool {
4444
Miri,
4545
Asan,
4646
Build,
47+
Check,
4748
}
4849

4950
impl Tool {
@@ -52,6 +53,7 @@ impl Tool {
5253
Tool::Miri => "miri/raw",
5354
Tool::Asan => "asan/raw",
5455
Tool::Build => "build/raw",
56+
Tool::Check => "check/raw",
5557
}
5658
}
5759

@@ -64,6 +66,7 @@ impl Tool {
6466
Tool::Miri => "miri/logs",
6567
Tool::Asan => "asan/logs",
6668
Tool::Build => "build/logs",
69+
Tool::Check => "check/logs",
6770
}
6871
}
6972

@@ -76,6 +79,7 @@ impl Tool {
7679
Tool::Miri => "miri/index.html",
7780
Tool::Asan => "asan/index.html",
7881
Tool::Build => "build/index.html",
82+
Tool::Check => "check/index.html",
7983
}
8084
}
8185
}
@@ -86,6 +90,7 @@ impl fmt::Display for Tool {
8690
Tool::Miri => "miri",
8791
Tool::Asan => "asan",
8892
Tool::Build => "build",
93+
Tool::Check => "check",
8994
};
9095
f.write_str(s)
9196
}
@@ -99,6 +104,7 @@ impl FromStr for Tool {
99104
"miri" => Ok(Self::Miri),
100105
"asan" => Ok(Self::Asan),
101106
"build" => Ok(Self::Build),
107+
"check" => Ok(Self::Check),
102108
_ => Err(format!("Invalid tool {}", s)),
103109
}
104110
}

0 commit comments

Comments
 (0)