Adapt to js_exec changes in zig-js-runtime

Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
Francis Bouvier
2024-07-08 17:42:03 +02:00
committed by Pierre Tachoire
parent f8395fec5c
commit b8ec53f708
7 changed files with 74 additions and 83 deletions

View File

@@ -141,7 +141,7 @@ pub fn main() !void {
var arena = std.heap.ArenaAllocator.init(alloc);
defer arena.deinit();
const res = wpt.run(&arena, wpt_dir, tc, &loader) catch |err| {
const result = wpt.run(&arena, wpt_dir, tc, &loader) catch |err| {
const suite = try Suite.init(alloc, tc, false, @errorName(err), null);
try results.append(suite);
@@ -151,9 +151,8 @@ pub fn main() !void {
failures += 1;
continue;
};
// no need to call res.deinit() thanks to the arena allocator.
const suite = try Suite.init(alloc, tc, res.success, res.result, res.stack);
const suite = try Suite.init(alloc, tc, true, result, null);
try results.append(suite);
if (out == .json) {