Merge pull request #159 from lightpanda-io/wpt-success-detailed

wpt: always return detailed result
This commit is contained in:
Pierre Tachoire
2024-01-18 09:15:54 +01:00
committed by GitHub

View File

@@ -126,13 +126,8 @@ pub fn run(arena: *std.heap.ArenaAllocator, comptime dir: []const u8, f: []const
return res; return res;
} }
// If the test failed, return detailed logs intead of the simple status. // return the detailed result.
if (!std.mem.eql(u8, res.result, "Pass")) {
return try evalJS(js_env, alloc, "report.log", "teststatus"); return try evalJS(js_env, alloc, "report.log", "teststatus");
}
// return the final result.
return res;
} }
fn evalJS(env: jsruntime.Env, alloc: std.mem.Allocator, script: []const u8, name: ?[]const u8) !jsruntime.JSResult { fn evalJS(env: jsruntime.Env, alloc: std.mem.Allocator, script: []const u8, name: ?[]const u8) !jsruntime.JSResult {