| ... | @@ -137,24 +137,11 @@ pub fn addParseCTests(b: &build.Builder, test_filter: ?[]const u8) -> &build.Ste | ... | @@ -137,24 +137,11 @@ pub fn addParseCTests(b: &build.Builder, test_filter: ?[]const u8) -> &build.Ste |
| 137 | pub fn addPkgTests(b: &build.Builder, test_filter: ?[]const u8, root_src: []const u8, | 137 | pub fn addPkgTests(b: &build.Builder, test_filter: ?[]const u8, root_src: []const u8, |
| 138 | name:[] const u8, desc: []const u8, with_lldb: bool) -> &build.Step | 138 | name:[] const u8, desc: []const u8, with_lldb: bool) -> &build.Step |
| 139 | { | 139 | { |
| 140 | return addPkgTestsRaw(b, test_filter, root_src, name, desc, false, with_lldb); | | |
| 141 | } | | |
| 142 | | | |
| 143 | pub fn addPkgTestsAlwaysLibc(b: &build.Builder, test_filter: ?[]const u8, root_src: []const u8, | | |
| 144 | name:[] const u8, desc: []const u8, with_lldb: bool) -> &build.Step | | |
| 145 | { | | |
| 146 | return addPkgTestsRaw(b, test_filter, root_src, name, desc, true, with_lldb); | | |
| 147 | } | | |
| 148 | | | |
| 149 | pub fn addPkgTestsRaw(b: &build.Builder, test_filter: ?[]const u8, root_src: []const u8, | | |
| 150 | name:[] const u8, desc: []const u8, always_link_libc: bool, with_lldb: bool) -> &build.Step | | |
| 151 | { | | |
| 152 | const libc_bools = if (always_link_libc) []bool{true} else []bool{false, true}; | | |
| 153 | const step = b.step(b.fmt("test-{}", name), desc); | 140 | const step = b.step(b.fmt("test-{}", name), desc); |
| 154 | for (test_targets) |test_target| { | 141 | for (test_targets) |test_target| { |
| 155 | const is_native = (test_target.os == builtin.os and test_target.arch == builtin.arch); | 142 | const is_native = (test_target.os == builtin.os and test_target.arch == builtin.arch); |
| 156 | for ([]Mode{Mode.Debug, Mode.ReleaseSafe, Mode.ReleaseFast}) |mode| { | 143 | for ([]Mode{Mode.Debug, Mode.ReleaseSafe, Mode.ReleaseFast}) |mode| { |
| 157 | for (libc_bools) |link_libc| { | 144 | for ([]bool{false, true}) |link_libc| { |
| 158 | if (link_libc and !is_native) { | 145 | if (link_libc and !is_native) { |
| 159 | // don't assume we have a cross-compiling libc set up | 146 | // don't assume we have a cross-compiling libc set up |
| 160 | continue; | 147 | continue; |