aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-09-17 14:43:51 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-09-17 14:43:51 -0400
commit7ee00730ac5679ea5e24fac352ed9b72469f9329 (patch)
treef05bee8200126abc3fe9b4ac019357fe239078e2 /build.zig
parenta9ecb26c34d77f616fb029af3d09ffd69b9aa178 (diff)
downloadzig-7ee00730ac5679ea5e24fac352ed9b72469f9329.tar.gz
zig-7ee00730ac5679ea5e24fac352ed9b72469f9329.zip
add option to run tests in LLDB and turn it on for macos travis
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig10
1 files changed, 7 insertions, 3 deletions
diff --git a/build.zig b/build.zig
index adc0d439d6..23359b829f 100644
--- a/build.zig
+++ b/build.zig
@@ -3,16 +3,20 @@ const tests = @import("test/tests.zig");
pub fn build(b: &Builder) {
const test_filter = b.option([]const u8, "test-filter", "Skip tests that do not match filter");
+ const with_lldb = b.option(bool, "with-lldb", "Run tests in LLDB to get a backtrace if one fails") ?? false;
const test_step = b.step("test", "Run all the tests");
test_step.dependOn(tests.addPkgTests(b, test_filter,
- "test/behavior.zig", "behavior", "Run the behavior tests"));
+ "test/behavior.zig", "behavior", "Run the behavior tests",
+ with_lldb));
test_step.dependOn(tests.addPkgTests(b, test_filter,
- "std/index.zig", "std", "Run the standard library tests"));
+ "std/index.zig", "std", "Run the standard library tests",
+ with_lldb));
test_step.dependOn(tests.addPkgTestsAlwaysLibc(b, test_filter,
- "std/special/compiler_rt/index.zig", "compiler-rt", "Run the compiler_rt tests"));
+ "std/special/compiler_rt/index.zig", "compiler-rt", "Run the compiler_rt tests",
+ with_lldb));
test_step.dependOn(tests.addCompareOutputTests(b, test_filter));
test_step.dependOn(tests.addBuildExampleTests(b, test_filter));