Commit 7bd80f2071

Andrew Kelley <andrew@ziglang.org>
2020-01-02 17:12:21
translate-c tests: print clang compile errors on nonzero exit code
1 parent 3dd067f
Changed files (1)
test/tests.zig
@@ -1512,7 +1512,7 @@ pub const TranslateCContext = struct {
             switch (term) {
                 .Exited => |code| {
                     if (code != 0) {
-                        warn("Compilation failed with exit code {}\n", .{code});
+                        warn("Compilation failed with exit code {}\n{}\n", .{ code, stderr_buf.toSliceConst() });
                         printInvocation(zig_args.toSliceConst());
                         return error.TestFailed;
                     }