Skip to content

Commit

Permalink
runner updates
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Feb 29, 2024
1 parent 0700df9 commit def8b51
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions crates/tests/tests/spec-tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,22 @@ fn run(wast: &Path) -> Result<(), anyhow::Error> {
.skip(1)
.next()
.map(|s| s.to_str().unwrap());

let mut config = walrus::ModuleConfig::new();
let extra_args: &[&str] = match proposal {
// stable features
None
| Some("multi-value")
| Some("nontrapping-float-to-int-conversions")
| Some("sign-extension-ops")
| Some("mutable-global") => &[],
| Some("mutable-global") => {
config.only_stable_features(true);
&[]
}

Some("simd") => &["--enable-simd"],
Some("bulk-memory-operations") => &["--enable-bulk-memory"],
Some("bulk-memory-operations") | Some("simd") => &[],

Some("reference-types") => &["--enable-reference-types", "--enable-bulk-memory"],
Some("reference-types") => &["--enable-reference-types"],

// TODO: should get threads working
Some("threads") => return Ok(()),
Expand Down Expand Up @@ -69,11 +73,6 @@ fn run(wast: &Path) -> Result<(), anyhow::Error> {
let test: Test = serde_json::from_str(&contents).context("failed to parse file")?;
let mut files = Vec::new();

let mut config = walrus::ModuleConfig::new();
if extra_args.len() == 0 {
config.only_stable_features(true);
}

for command in test.commands {
let filename = match command.get("filename") {
Some(name) => name.as_str().unwrap().to_string(),
Expand Down

0 comments on commit def8b51

Please sign in to comment.