Compare commits
3 Commits
fc17399d82
...
25ea67399a
Author | SHA1 | Date | |
---|---|---|---|
25ea67399a | |||
c6daf8d690 | |||
7d826df3e4 |
@ -24,13 +24,7 @@ Result<int> luna_main(int argc, char** argv)
|
|||||||
for (const auto& program : files)
|
for (const auto& program : files)
|
||||||
{
|
{
|
||||||
auto command = TRY(String::format("%s/%s"_sv, test_dir.chars(), program.chars()));
|
auto command = TRY(String::format("%s/%s"_sv, test_dir.chars(), program.chars()));
|
||||||
StringView args[] = { command.view() };
|
int status = system(command.chars());
|
||||||
|
|
||||||
auto pid = TRY(os::Process::spawn(args[0], Slice<StringView> { args, 1 }, false));
|
|
||||||
|
|
||||||
int status;
|
|
||||||
TRY(os::Process::wait(pid, &status));
|
|
||||||
|
|
||||||
if (WEXITSTATUS(status) != 0)
|
if (WEXITSTATUS(status) != 0)
|
||||||
{
|
{
|
||||||
os::Process::kill(1, SIGQUIT); // Tell init to report a failed test run.
|
os::Process::kill(1, SIGQUIT); // Tell init to report a failed test run.
|
||||||
|
Loading…
Reference in New Issue
Block a user