diff --git a/.gitignore b/.gitignore index 9b0b49b..0fd2e14 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .cache/ .zig-cache/ zig-out/ +scripts/__pycache__/ *.o .gdb_history *.json @@ -9,3 +10,4 @@ zig-out/ *.qpa *.xml *.html +*.pyc diff --git a/build.zig b/build.zig index 5803345..5c1e15e 100644 --- a/build.zig +++ b/build.zig @@ -173,7 +173,7 @@ fn addCTestRunner(b: *std.Build, impl: *const ImplementationDesc, exe: *std.Buil fn addCTS(b: *std.Build, target: std.Build.ResolvedTarget, impl: *const ImplementationDesc, impl_lib: *std.Build.Step.Compile, comptime gdb: bool) !*std.Build.Step { const cts = b.dependency("cts_bin", .{}); - const cts_exe_path = cts.path(b.fmt("deqp-vk-{s}", .{ + const cts_exe_name = cts.path(b.fmt("deqp-vk-{s}", .{ switch (if (target.query.os_tag) |tag| tag else builtin.target.os.tag) { .linux => "linux.x86_64", else => unreachable, @@ -187,17 +187,21 @@ fn addCTS(b: *std.Build, target: std.Build.ResolvedTarget, impl: *const Implemen }), ).getPath3(b, null).toString(b.allocator); - var command_line = std.ArrayList([]const u8).empty; + const cts_exe_path = try cts_exe_name.getPath3(b, null).toString(b.allocator); + + const run = b.addSystemCommand(&[_][]const u8{"./scripts/wrap_alway_success.sh"}); + run.step.dependOn(&impl_lib.step); if (gdb) { - try command_line.append(b.allocator, "gdb"); - try command_line.append(b.allocator, "--args"); + run.addArg("gdb"); + run.addArg("--args"); } - try command_line.append(b.allocator, try cts_exe_path.getPath3(b, null).toString(b.allocator)); - try command_line.append(b.allocator, b.fmt("--deqp-archive-dir={s}", .{try cts.path("").getPath3(b, null).toString(b.allocator)})); - try command_line.append(b.allocator, b.fmt("--deqp-vk-library-path={s}", .{b.getInstallPath(.lib, impl_lib.out_lib_filename)})); - try command_line.append(b.allocator, "--deqp-log-filename=vk-cts-logs.qpa"); + run.addArg(cts_exe_path); + run.addArg(b.fmt("--deqp-archive-dir={s}", .{try cts.path("").getPath3(b, null).toString(b.allocator)})); + run.addArg(b.fmt("--deqp-vk-library-path={s}", .{b.getInstallPath(.lib, impl_lib.out_lib_filename)})); + run.addArg("--deqp-log-filename=vk-cts-logs.qpa"); + run.addArg("--deqp-log-compact=enable"); var requires_explicit_tests = false; if (b.args) |args| { @@ -205,17 +209,13 @@ fn addCTS(b: *std.Build, target: std.Build.ResolvedTarget, impl: *const Implemen if (std.mem.startsWith(u8, arg, "--deqp-case")) { requires_explicit_tests = true; } - try command_line.append(b.allocator, arg); + run.addArg(arg); } } if (!requires_explicit_tests) { - try command_line.append(b.allocator, b.fmt("--deqp-caselist-file={s}", .{mustpass})); + run.addArg(b.fmt("--deqp-caselist-file={s}", .{mustpass})); } - const run = b.addSystemCommand(command_line.items); - run.expectExitCode(1); - run.step.dependOn(&impl_lib.step); - const run_to_xml = b.addSystemCommand(&[_][]const u8{ "python", "./scripts/cts_logs_to_xml.py", "./vk-cts-logs.qpa", "./vk-cts-logs.xml" }); run_to_xml.step.dependOn(&run.step); diff --git a/scripts/__pycache__/log_parser.cpython-313.pyc b/scripts/__pycache__/log_parser.cpython-313.pyc deleted file mode 100644 index dc7e885..0000000 Binary files a/scripts/__pycache__/log_parser.cpython-313.pyc and /dev/null differ diff --git a/scripts/wrap_alway_success.sh b/scripts/wrap_alway_success.sh new file mode 100755 index 0000000..24e0c99 --- /dev/null +++ b/scripts/wrap_alway_success.sh @@ -0,0 +1,3 @@ +#!/bin/sh +"$@" +exit 0