Skip to content

Commit b36caf7

Browse files
committed
Do not exit when tests run
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
1 parent ac3a6f2 commit b36caf7

File tree

1 file changed

+5
-5
lines changed
  • crates/conformance-tests/src

1 file changed

+5
-5
lines changed

crates/conformance-tests/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,21 @@ impl Config {
3333
}
3434
}
3535

36-
/// Run the conformance tests
36+
/// Run the conformance tests and return the results.
3737
pub fn run_tests(
3838
config: Config,
3939
run: impl Fn(Test) -> anyhow::Result<()> + Send + Clone + 'static,
40-
) -> anyhow::Result<()> {
40+
) -> anyhow::Result<libtest_mimic::Conclusion> {
4141
let tests_dir = download_tests(&config.version)?;
4242
run_tests_from(tests_dir, config, run)
4343
}
4444

45-
/// Run the conformance tests located in the given directory
45+
/// Run the conformance tests located in the given directory and returns the Conclusion
4646
pub fn run_tests_from(
4747
tests_dir: impl AsRef<Path>,
4848
config: Config,
4949
run: impl Fn(Test) -> anyhow::Result<()> + Send + Clone + 'static,
50-
) -> anyhow::Result<()> {
50+
) -> anyhow::Result<libtest_mimic::Conclusion> {
5151
let trials = tests_iter(tests_dir)?
5252
.map(|test| {
5353
let run = run.clone();
@@ -56,7 +56,7 @@ pub fn run_tests_from(
5656
.with_ignored_flag(config.ignored.contains(&name))
5757
})
5858
.collect();
59-
libtest_mimic::run(&Default::default(), trials).exit();
59+
Ok(libtest_mimic::run(&Default::default(), trials))
6060
}
6161

6262
/// Download the conformance tests and return the path to the directory where they are written to

0 commit comments

Comments
 (0)