aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-01-05 20:44:19 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-01-05 20:44:19 -0700
commit91e3431d4a55aa46884b267be5aa586f3ed94f74 (patch)
tree8965069f44159f9330c23090c626a797cfcb108e /src
parentab5f7b51566ad2c8e635e81b8515a97206daf8ab (diff)
downloadzig-91e3431d4a55aa46884b267be5aa586f3ed94f74.tar.gz
zig-91e3431d4a55aa46884b267be5aa586f3ed94f74.zip
stage2 test harness: don't try to run non-native C backend tests
Diffstat (limited to 'src')
-rw-r--r--src/test.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test.zig b/src/test.zig
index f630898189..682fb5078f 100644
--- a/src/test.zig
+++ b/src/test.zig
@@ -817,6 +817,10 @@ pub const TestContext = struct {
// child process.
const exe_path = try std.fmt.allocPrint(arena, "." ++ std.fs.path.sep_str ++ "{s}", .{bin_name});
if (case.object_format != null and case.object_format.? == .c) {
+ if (case.target.getExternalExecutor() != .native) {
+ // We wouldn't be able to run the compiled C code.
+ return; // Pass test.
+ }
try argv.appendSlice(&[_][]const u8{
std.testing.zig_exe_path,
"run",