| author | |
| committer | |
| log | 9d10246a809752be6952ba3d9021e8cbfc1931a1 |
| tree | edd5bfe30c41960f50853a5bb73faa10a47ee66e |
| parent | 2a29381117be7196378229d1c4e797f704675c61 |
| signature | Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM |
2 files changed, 8 insertions(+), 0 deletions(-)
build.zig+1| ... | @@ -552,6 +552,7 @@ pub fn build(b: *std.Build) !void { | ... | @@ -552,6 +552,7 @@ pub fn build(b: *std.Build) !void { |
| 552 | test_step.dependOn(tests.addAssembleAndLinkTests(b, test_filters, optimization_modes)); | 552 | test_step.dependOn(tests.addAssembleAndLinkTests(b, test_filters, optimization_modes)); |
| 553 | if (tests.addDebuggerTests(b, .{ | 553 | if (tests.addDebuggerTests(b, .{ |
| 554 | .test_filters = test_filters, | 554 | .test_filters = test_filters, |
| 555 | .test_target_filters = test_target_filters, | ||
| 555 | .gdb = b.option([]const u8, "gdb", "path to gdb binary"), | 556 | .gdb = b.option([]const u8, "gdb", "path to gdb binary"), |
| 556 | .lldb = b.option([]const u8, "lldb", "path to lldb binary"), | 557 | .lldb = b.option([]const u8, "lldb", "path to lldb binary"), |
| 557 | .optimize_modes = optimization_modes, | 558 | .optimize_modes = optimization_modes, |
test/src/Debugger.zig+7| ... | @@ -4,6 +4,7 @@ root_step: *std.Build.Step, | ... | @@ -4,6 +4,7 @@ root_step: *std.Build.Step, |
| 4 | 4 | ||
| 5 | pub const Options = struct { | 5 | pub const Options = struct { |
| 6 | test_filters: []const []const u8, | 6 | test_filters: []const []const u8, |
| 7 | test_target_filters: []const []const u8, | ||
| 7 | gdb: ?[]const u8, | 8 | gdb: ?[]const u8, |
| 8 | lldb: ?[]const u8, | 9 | lldb: ?[]const u8, |
| 9 | optimize_modes: []const std.builtin.OptimizeMode, | 10 | optimize_modes: []const std.builtin.OptimizeMode, |
| ... | @@ -1988,6 +1989,12 @@ fn addTest( | ... | @@ -1988,6 +1989,12 @@ fn addTest( |
| 1988 | for (db.options.test_filters) |test_filter| { | 1989 | for (db.options.test_filters) |test_filter| { |
| 1989 | if (std.mem.indexOf(u8, name, test_filter)) |_| return; | 1990 | if (std.mem.indexOf(u8, name, test_filter)) |_| return; |
| 1990 | } | 1991 | } |
| 1992 | if (db.options.test_target_filters.len > 0) { | ||
| 1993 | const triple_txt = target.resolved.result.zigTriple(db.b.allocator) catch @panic("OOM"); | ||
| 1994 | for (db.options.test_target_filters) |filter| { | ||
| 1995 | if (std.mem.indexOf(u8, triple_txt, filter) != null) break; | ||
| 1996 | } else return; | ||
| 1997 | } | ||
| 1991 | const files_wf = db.b.addWriteFiles(); | 1998 | const files_wf = db.b.addWriteFiles(); |
| 1992 | const exe = db.b.addExecutable(.{ | 1999 | const exe = db.b.addExecutable(.{ |
| 1993 | .name = name, | 2000 | .name = name, |