authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-03-11 10:29:57-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-03-11 10:35:39-04:00
log6a5c2b249d64952f3fc91b554e484d27ceb3d1a9
tree97cdde8b7c858210cde8394c8427c880f4064958
parent895fab156a83e7a71487388dfa22743aa54c4b7e
signature Commit is signed but in an unrecognized format.

Revert "use unique test source names for test-gen-h"

This reverts commit 264b03d57027da4b7c6e691d9b2a4340cd10fff0. This workaround is no longer necessary.

1 files changed, 1 insertions(+), 7 deletions(-)

test/tests.zig+1-7
......@@ -158,7 +158,6 @@ pub fn addGenHTests(b: *build.Builder, test_filter: ?[]const u8) *build.Step {
158158 .step = b.step("test-gen-h", "Run the C header file generation tests"),
159159 .test_index = 0,
160160 .test_filter = test_filter,
161 .counter = 0,
162161 };
163162
164163 gen_h.addCases(cases);
......@@ -1105,7 +1104,6 @@ pub const GenHContext = struct {
11051104 step: *build.Step,
11061105 test_index: usize,
11071106 test_filter: ?[]const u8,
1108 counter: usize,
11091107
11101108 const TestCase = struct {
11111109 name: []const u8,
......@@ -1208,11 +1206,7 @@ pub const GenHContext = struct {
12081206 }
12091207
12101208 pub fn add(self: *GenHContext, name: []const u8, source: []const u8, expected_lines: ...) void {
1211 // MacOS appears to not be returning nanoseconds in fstat mtime,
1212 // which causes fast test executions to think the file contents are unchanged.
1213 const modified_name = self.b.fmt("test-{}.zig", self.counter);
1214 self.counter += 1;
1215 const tc = self.create(modified_name, name, source, expected_lines);
1209 const tc = self.create("test.zig", name, source, expected_lines);
12161210 self.addCase(tc);
12171211 }
12181212