Compare commits

..

1 Commits

Author SHA1 Message Date
a0334e50b4 wip
Some checks failed
CI / ci (Release, ubuntu-latest) (pull_request) Successful in 34m59s
CI / release (ubuntu-latest) (pull_request) Has been cancelled
CI / ci (Debug, ubuntu-latest) (pull_request) Has been cancelled
2025-06-22 10:40:55 -06:00

View File

@ -605,44 +605,40 @@ void entry_point(Slice<char* const> arguments, Slice<char* const> envp)
for (auto name: names)
{
for (auto is_host_cpu_model : is_host_cpu_model_array)
for (BuildMode build_mode = BuildMode::debug_none; build_mode < BuildMode::count; build_mode = (BuildMode)((backing_type(BuildMode))build_mode + 1))
{
for (BuildMode build_mode = BuildMode::debug_none; build_mode < BuildMode::count; build_mode = (BuildMode)((backing_type(BuildMode))build_mode + 1))
for (bool has_debug_info : has_debug_info_array)
{
for (bool has_debug_info : has_debug_info_array)
auto position = arena->position;
String relative_file_path_parts[] = { string_literal("tests/"), name, string_literal(".bbb") };
auto relative_file_path = arena_join_string(arena, array_to_slice(relative_file_path_parts));
auto executable_path = compile_file(arena, {
.relative_file_path = relative_file_path,
.build_mode = build_mode,
.has_debug_info = has_debug_info,
.silent = true,
});
char* const arguments[] =
{
auto position = arena->position;
String relative_file_path_parts[] = { string_literal("tests/"), name, string_literal(".bbb") };
auto relative_file_path = arena_join_string(arena, array_to_slice(relative_file_path_parts));
auto executable_path = compile_file(arena, {
.relative_file_path = relative_file_path,
.build_mode = build_mode,
.has_debug_info = has_debug_info,
.host_cpu_model = is_host_cpu_model,
.silent = true,
});
char* const arguments[] =
{
(char*)executable_path.pointer,
0,
};
Slice<char* const> arg_slice = array_to_slice(arguments);
arg_slice.length -= 1;
auto execution = os_execute(arena, arg_slice, environment, {});
auto success = execution.termination_kind == TerminationKind::exit && execution.termination_code == 0;
if (!success)
{
print(string_literal("Test failed: "));
print(executable_path);
print(string_literal("\n"));
bb_fail();
}
arena_restore(arena, position);
(char*)executable_path.pointer,
0,
};
Slice<char* const> arg_slice = array_to_slice(arguments);
arg_slice.length -= 1;
auto execution = os_execute(arena, arg_slice, environment, {});
auto success = execution.termination_kind == TerminationKind::exit && execution.termination_code == 0;
if (!success)
{
print(string_literal("Test failed: "));
print(executable_path);
print(string_literal("\n"));
bb_fail();
}
arena_restore(arena, position);
}
}
}