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()) {
|
if (os.is_being_debugged()) {
|
||||||
@trap();
|
@trap();
|
||||||
} else {
|
} else {
|
||||||
switch (is_test) {
|
if (is_test) {
|
||||||
true => @panic("aborting"),
|
@import("std").debug.dumpCurrentStackTrace(@returnAddress());
|
||||||
false => libc.exit(1),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 {
|
pub fn main(argc: c_int, argv: [*:null]const ?[*:0]const u8) callconv(.C) c_int {
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
lib.print_string("Failed to match argument count");
|
lib.print_string("Failed to match argument count\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
const relative_file_path_pointer = argv[1] orelse return 1;
|
const relative_file_path_pointer = argv[1] orelse return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user