Fix test stack traces
This commit is contained in:
parent
41e566a64f
commit
0d797fb2ab
@ -515,10 +515,11 @@ pub const os = struct {
|
||||
if (os.is_being_debugged()) {
|
||||
@trap();
|
||||
} else {
|
||||
switch (is_test) {
|
||||
true => @panic("aborting"),
|
||||
false => libc.exit(1),
|
||||
if (is_test) {
|
||||
@import("std").debug.dumpCurrentStackTrace(@returnAddress());
|
||||
}
|
||||
|
||||
libc.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ pub const panic = lib.panic_struct;
|
||||
|
||||
pub fn main(argc: c_int, argv: [*:null]const ?[*:0]const u8) callconv(.C) c_int {
|
||||
if (argc != 2) {
|
||||
lib.print_string("Failed to match argument count");
|
||||
lib.print_string("Failed to match argument count\n");
|
||||
return 1;
|
||||
}
|
||||
const relative_file_path_pointer = argv[1] orelse return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user