| ... | @@ -420,6 +420,7 @@ const usage_build_generic = | ... | @@ -420,6 +420,7 @@ const usage_build_generic = |
| 420 | \\ --test-cmd [arg] Specify test execution command one arg at a time | 420 | \\ --test-cmd [arg] Specify test execution command one arg at a time |
| 421 | \\ --test-cmd-bin Appends test binary path to test cmd args | 421 | \\ --test-cmd-bin Appends test binary path to test cmd args |
| 422 | \\ --test-evented-io Runs the test in evented I/O mode | 422 | \\ --test-evented-io Runs the test in evented I/O mode |
| | 423 | \\ --test-no-exec Compiles test binary without running it |
| 423 | \\ | 424 | \\ |
| 424 | \\Debug Options (Zig Compiler Development): | 425 | \\Debug Options (Zig Compiler Development): |
| 425 | \\ -ftime-report Print timing diagnostics | 426 | \\ -ftime-report Print timing diagnostics |
| ... | @@ -603,6 +604,7 @@ fn buildOutputType( | ... | @@ -603,6 +604,7 @@ fn buildOutputType( |
| 603 | var linker_nxcompat = false; | 604 | var linker_nxcompat = false; |
| 604 | var linker_dynamicbase = false; | 605 | var linker_dynamicbase = false; |
| 605 | var test_evented_io = false; | 606 | var test_evented_io = false; |
| | 607 | var test_no_exec = false; |
| 606 | var stack_size_override: ?u64 = null; | 608 | var stack_size_override: ?u64 = null; |
| 607 | var image_base_override: ?u64 = null; | 609 | var image_base_override: ?u64 = null; |
| 608 | var use_llvm: ?bool = null; | 610 | var use_llvm: ?bool = null; |
| ... | @@ -938,6 +940,8 @@ fn buildOutputType( | ... | @@ -938,6 +940,8 @@ fn buildOutputType( |
| 938 | try test_exec_args.append(null); | 940 | try test_exec_args.append(null); |
| 939 | } else if (mem.eql(u8, arg, "--test-evented-io")) { | 941 | } else if (mem.eql(u8, arg, "--test-evented-io")) { |
| 940 | test_evented_io = true; | 942 | test_evented_io = true; |
| | 943 | } else if (mem.eql(u8, arg, "--test-no-exec")) { |
| | 944 | test_no_exec = true; |
| 941 | } else if (mem.eql(u8, arg, "--watch")) { | 945 | } else if (mem.eql(u8, arg, "--watch")) { |
| 942 | watch = true; | 946 | watch = true; |
| 943 | } else if (mem.eql(u8, arg, "-ftime-report")) { | 947 | } else if (mem.eql(u8, arg, "-ftime-report")) { |
| ... | @@ -2167,7 +2171,8 @@ fn buildOutputType( | ... | @@ -2167,7 +2171,8 @@ fn buildOutputType( |
| 2167 | } | 2171 | } |
| 2168 | | 2172 | |
| 2169 | const run_or_test = switch (arg_mode) { | 2173 | const run_or_test = switch (arg_mode) { |
| 2170 | .run, .zig_test => true, | 2174 | .run => true, |
| | 2175 | .zig_test => !test_no_exec, |
| 2171 | else => false, | 2176 | else => false, |
| 2172 | }; | 2177 | }; |
| 2173 | if (run_or_test) { | 2178 | if (run_or_test) { |