Skip to content

Commit ac0414b

Browse files
authored
Merge pull request #2872 from itowlson/fix-runtime-test-failures-being-buried
Fix for failing runtime tests not failing the test suite
2 parents e32139c + 9369af5 commit ac0414b

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ members = [
119119
anyhow = "1"
120120
async-trait = "0.1"
121121
bytes = "1"
122-
conformance-tests = { git = "https://github.com/fermyon/conformance-tests", rev = "387b7f375df59e6254a7c29cf4a53507a9f46d32" }
122+
conformance-tests = { git = "https://github.com/fermyon/conformance-tests", rev = "ecd22a45bcc5c775a56c67689a89aa4005866ac0" }
123123
dirs = "5.0"
124124
futures = "0.3"
125125
glob = "0.3"
@@ -139,7 +139,7 @@ serde = { version = "1", features = ["derive", "rc"] }
139139
serde_json = "1.0"
140140
sha2 = "0.10"
141141
tempfile = "3"
142-
test-environment = { git = "https://github.com/fermyon/conformance-tests", rev = "387b7f375df59e6254a7c29cf4a53507a9f46d32" }
142+
test-environment = { git = "https://github.com/fermyon/conformance-tests", rev = "ecd22a45bcc5c775a56c67689a89aa4005866ac0" }
143143
thiserror = "1"
144144
tokio = "1"
145145
toml = "0.8"

tests/conformance-tests/src/main.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ fn main() {
33
.nth(1)
44
.expect("expected first argument to be path to spin binary")
55
.into();
6-
conformance_tests::run_tests("canary", move |test| {
6+
let config = conformance_tests::Config::new("canary");
7+
conformance_tests::run_tests(config, move |test| {
78
conformance::run_test(test, &spin_binary)
89
})
9-
.unwrap();
10+
.unwrap()
11+
.exit();
1012
}

tests/runtime.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ mod runtime_tests {
2727
}
2828

2929
#[test]
30-
fn conformance_tests() {
31-
conformance_tests::run_tests("canary", move |test| {
30+
fn conformance_tests() -> anyhow::Result<()> {
31+
let config = conformance_tests::Config::new("canary");
32+
let conclusion = conformance_tests::run_tests(config, move |test| {
3233
conformance::run_test(test, &spin_binary())
33-
})
34-
.unwrap();
34+
})?;
35+
if conclusion.has_failed() {
36+
anyhow::bail!("One or more errors occurred in the conformance tests");
37+
}
38+
Ok(())
3539
}
3640

3741
fn spin_binary() -> PathBuf {

0 commit comments

Comments
 (0)