ocloc tests: handle SIGSEGV and SIGABRT

Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
Artur Harasimiuk 2022-07-18 21:24:13 +00:00 committed by Compute-Runtime-Automation
parent 52b00a11b0
commit f89ea1685e
1 changed files with 14 additions and 1 deletions

View File

@ -41,7 +41,9 @@ std::string getRunPath() {
int main(int argc, char **argv) {
int retVal = 0;
bool useDefaultListener = false;
bool enableAbrt = true;
bool enableAlarm = true;
bool enableSegv = true;
bool showTestStats = false;
bool dumpTestStats = false;
std::string dumpTestStatsFileName = "";
@ -149,8 +151,19 @@ int main(int argc, char **argv) {
gEnvironment = reinterpret_cast<Environment *>(::testing::AddGlobalTestEnvironment(new Environment(devicePrefix, familyNameWithType)));
int sigOut = setAlarm(enableAlarm);
if (sigOut != 0)
if (sigOut != 0) {
return sigOut;
}
sigOut = setSegv(enableSegv);
if (sigOut != 0) {
return sigOut;
}
sigOut = setAbrt(enableAbrt);
if (sigOut != 0) {
return sigOut;
}
retVal = RUN_ALL_TESTS();