Reproduce command
Some checks failed
CI / ci (MinSizeRel, ubuntu-latest) (pull_request) Failing after 32s
CI / ci (RelWithDebInfo, ubuntu-latest) (pull_request) Failing after 31s
CI / ci (Release, ubuntu-latest) (pull_request) Failing after 30s
CI / ci (Debug, ubuntu-latest) (pull_request) Failing after 1m5s
Some checks failed
CI / ci (MinSizeRel, ubuntu-latest) (pull_request) Failing after 32s
CI / ci (RelWithDebInfo, ubuntu-latest) (pull_request) Failing after 31s
CI / ci (Release, ubuntu-latest) (pull_request) Failing after 30s
CI / ci (Debug, ubuntu-latest) (pull_request) Failing after 1m5s
This commit is contained in:
parent
03aa714a51
commit
113a584b9b
@ -34,3 +34,4 @@ jobs:
|
|||||||
./generate.sh
|
./generate.sh
|
||||||
./build.sh
|
./build.sh
|
||||||
./build/bb test
|
./build/bb test
|
||||||
|
./build/bb reproduce
|
||||||
|
@ -984,6 +984,7 @@ CompilerCommand = enum
|
|||||||
{
|
{
|
||||||
compile,
|
compile,
|
||||||
test,
|
test,
|
||||||
|
reproduce,
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildMode = enum
|
BuildMode = enum
|
||||||
@ -18656,6 +18657,43 @@ names: [_][]u8 =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
.reproduce =>
|
||||||
|
{
|
||||||
|
for (build_mode: #enum_values(BuildMode))
|
||||||
|
{
|
||||||
|
for (has_debug_info: debug_info_array)
|
||||||
|
{
|
||||||
|
>position = arena.position;
|
||||||
|
|
||||||
|
// Produce the compiler
|
||||||
|
>relative_file_path = "src/compiler.bbb";
|
||||||
|
>executable_path = compile_file(arena, {
|
||||||
|
.relative_file_path = relative_file_path,
|
||||||
|
.build_mode = build_mode,
|
||||||
|
.has_debug_info = has_debug_info,
|
||||||
|
.silent = 1,
|
||||||
|
}, envp);
|
||||||
|
|
||||||
|
// Test the compiler
|
||||||
|
>arguments: [_]&u8 = [
|
||||||
|
executable_path.pointer,
|
||||||
|
"test",
|
||||||
|
zero,
|
||||||
|
];
|
||||||
|
>args = arguments[..arguments.length - 1];
|
||||||
|
>execution = os_execute(arena, args, envp, zero);
|
||||||
|
|
||||||
|
>success = execution.termination_kind == .exit and execution.termination_code == 0;
|
||||||
|
|
||||||
|
if (!success)
|
||||||
|
{
|
||||||
|
#trap();
|
||||||
|
}
|
||||||
|
|
||||||
|
arena.position = position;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user