Skip to content

Commit

Permalink
leverage build.zig.zon to download WebAssembly testsuite
Browse files Browse the repository at this point in the history
  • Loading branch information
marler8997 committed Jun 15, 2024
1 parent bcb64e0 commit c4ef782
Show file tree
Hide file tree
Showing 249 changed files with 7 additions and 190,163 deletions.
4 changes: 3 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ pub fn build(b: *Build) !void {
});
testrunner.root_module.addImport("zware", zware_module);

const testsuite_dep = b.dependency("testsuite", .{});

const testsuite_step = b.step("testsuite", "Run all the testsuite tests");
for (test_names) |test_name| {
const run_wast2json = b.addRunArtifact(wast2json);
run_wast2json.addFileArg(b.path(b.fmt("test/testsuite/{s}.wast", .{test_name})));
run_wast2json.addFileArg(testsuite_dep.path(b.fmt("{s}.wast", .{test_name})));
run_wast2json.addArg("-o");
const json_file = run_wast2json.addOutputFileArg(b.fmt("{s}.json", .{test_name}));

Expand Down
4 changes: 4 additions & 0 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@
.url = "https://github.com/WebAssembly/wabt/archive/39f85a791cbbad91a253a851841a29777efdc2cd.tar.gz",
.hash = "1220097b5cfb369f95493a753b0b12525f065e2cf607d62e314d54c54aa1071a1eed",
},
.testsuite = .{
.url = "https://github.com/WebAssembly/testsuite/archive/e25ae159357c055b3a6fac99043644e208d26d2a.tar.gz",
.hash = "122045901fc130829252a0beb5e98abc79aea814af8c195fe210fa05bda77cea83ef",
},
},
}
8 changes: 0 additions & 8 deletions test/testsuite/Contributing.md

This file was deleted.

202 changes: 0 additions & 202 deletions test/testsuite/LICENSE

This file was deleted.

18 changes: 0 additions & 18 deletions test/testsuite/README.md

This file was deleted.

Loading

0 comments on commit c4ef782

Please sign in to comment.