Skip to content

Commit

Permalink
Improve test framework error logging, clang warning settings in non-s…
Browse files Browse the repository at this point in the history
…trict mode
  • Loading branch information
SanderMertens committed Dec 1, 2023
1 parent 7131e55 commit 5accda3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 3 additions & 0 deletions drivers/lang/c/src/gcc/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ void gcc_add_std(
} else {
ut_strbuf_appendstr(cmd, " -Wno-missing-field-initializers");
ut_strbuf_appendstr(cmd, " -Wno-unused-parameter");
if (is_clang(lang)) {
ut_strbuf_appendstr(cmd, " -Wno-c++11-narrowing");
}
}

/* If project contains imported source files from other projects, warnings
Expand Down
9 changes: 3 additions & 6 deletions drivers/test/src/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,9 @@ void* bake_test_run_suite_range(
ut_catch();
if (sig) {
if (sig == 6) {
ut_log(
"#[red]FAIL#[reset]: %s aborted\n", test_name);
ut_log("#[red]FAIL#[reset]: %s aborted\n", test_name);
} else if (sig == 11) {
ut_log(
"#[red]FAIL#[reset]: %s segfaulted\n", test_name);
ut_log("#[red]FAIL#[reset]: %s segfaulted\n", test_name);
} else {
/* Signal 4 seems to get thrown every now and then when
* trying to create lots of processes. Retry a few times
Expand All @@ -268,8 +266,7 @@ void* bake_test_run_suite_range(
ut_log("#[red]retried 5 times after sig 4\n");
}
}
ut_log(
"#[red]FAIL#[reset]: %s exited with signal %d\n",
ut_log("#[red]FAIL#[reset]: %s exited with signal %d\n",
test_name, sig);
}
result = -1;
Expand Down

0 comments on commit 5accda3

Please sign in to comment.