Skip to content

Commit 57dde5e

Browse files
committed
switch back to main branch of component-model repo
...and skip or `should_fail` the tests that won't pass until WebAssembly/component-model#578 is merged. Signed-off-by: Joel Dice <joel.dice@fermyon.com>
1 parent a8c9d94 commit 57dde5e

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

crates/test-util/src/wast.rs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,26 @@ pub fn find_tests(root: &Path) -> Result<Vec<WastTest>> {
5252
&FindConfig::Infer(component_test_config),
5353
)
5454
.with_context(|| format!("failed to add tests from `{}`", cm_tests.display()))?;
55+
56+
// Temporarily work around upstream tests that loop forever.
57+
//
58+
// Now that `thread.yield` and `CALLBACK_CODE_YIELD` are both no-ops in
59+
// non-blocking contexts, these tests need to be updated; meanwhile, we skip
60+
// them.
61+
//
62+
// TODO: remove this once
63+
// https://github.com/WebAssembly/component-model/pull/578 has been merged:
64+
{
65+
let skip_list = &["drop-subtask.wast", "async-calls-sync.wast"];
66+
tests.retain(|test| {
67+
test.path
68+
.file_name()
69+
.and_then(|name| name.to_str())
70+
.map(|name| !skip_list.contains(&name))
71+
.unwrap_or(true)
72+
});
73+
}
74+
5575
Ok(tests)
5676
}
5777

@@ -679,6 +699,26 @@ impl WastTest {
679699
"component-model/test/values/trap-in-post-return.wast",
680700
"component-model/test/wasmtime/resources.wast",
681701
"component-model/test/wasm-tools/naming.wast",
702+
// TODO: remove these once
703+
// https://github.com/WebAssembly/component-model/pull/578 has been
704+
// merged:
705+
"component-model/test/async/async-calls-sync.wast",
706+
"component-model/test/async/backpressure-deadlock.wast",
707+
"component-model/test/async/cancel-stream.wast",
708+
"component-model/test/async/cancel-subtask.wast",
709+
"component-model/test/async/deadlock.wast",
710+
"component-model/test/async/drop-subtask.wast",
711+
"component-model/test/async/drop-waitable-set.wast",
712+
"component-model/test/async/empty-wait.wast",
713+
"component-model/test/async/fused.wast",
714+
"component-model/test/async/future-read.wast",
715+
"component-model/test/async/partial-stream-copies.wast",
716+
"component-model/test/async/passing-resources.wast",
717+
"component-model/test/async/stackful.wast",
718+
"component-model/test/async/trap-if-block-and-sync.wast",
719+
"component-model/test/async/trap-if-done.wast",
720+
"component-model/test/async/wait-during-callback.wast",
721+
"component-model/test/async/zero-length.wast",
682722
];
683723
if failing_component_model_tests
684724
.iter()

0 commit comments

Comments
 (0)