Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scripts/kani-regression.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ for testp in "${TESTS[@]}"; do
suite=${testl[0]}
mode=${testl[1]}
echo "Check compiletest suite=$suite mode=$mode"
cargo run -p compiletest --quiet -- --suite $suite --mode $mode --quiet
cargo run -p compiletest --quiet -- --suite $suite --mode $mode \
--quiet --no-fail-fast
done

# Check codegen for the standard library
Expand Down
4 changes: 4 additions & 0 deletions tools/compiletest/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ pub struct Config {
/// Timeout duration for each test.
pub timeout: Option<Duration>,

/// Whether we will abort execution when a failure occurs.
/// When set to false, this will execute the entire test suite regardless of any failure.
pub fail_fast: bool,

/// Whether we will run the tests or not.
pub dry_run: bool,
}
Expand Down
6 changes: 5 additions & 1 deletion tools/compiletest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
.optflag("h", "help", "show this message")
.optopt("", "edition", "default Rust edition", "EDITION")
.optopt("", "timeout", "the timeout for each test in seconds", "TIMEOUT")
.optflag("", "no-fail-fast", "run all tests regardless of failure")
.optflag("", "dry-run", "don't actually run the tests")
;

Expand Down Expand Up @@ -157,6 +158,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
color,
edition: matches.opt_str("edition"),
force_rerun: matches.opt_present("force-rerun"),
fail_fast: !matches.opt_present("no-fail-fast"),
dry_run: matches.opt_present("dry-run"),
timeout,
}
Expand All @@ -176,6 +178,8 @@ pub fn log_config(config: &Config) {
logv(c, format!("verbose: {}", config.verbose));
logv(c, format!("quiet: {}", config.quiet));
logv(c, format!("timeout: {:?}", config.timeout));
logv(c, format!("fail-fast: {:?}", config.fail_fast));
logv(c, format!("dry-run: {:?}", config.dry_run));
logv(
c,
format!(
Expand Down Expand Up @@ -285,7 +289,7 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
list: false,
options: test::Options::new(),
time_options: None,
fail_fast: true,
fail_fast: config.fail_fast,
force_run_in_process: false,
}
}
Expand Down