Skip to content
Snippets Groups Projects
Commit 368e7615 authored by Petri Latvala's avatar Petri Latvala
Browse files

runner: Exit with 2 when overall timeout exceeded


That leaves exitcode 1 for aborts and initialization failures. Should
maybe differentiate those as well. Not to mention document the exit
codes.

Also fix igt_resume to follow suit to igt_runner: Generate
results.json even when aborting or exceeding overall-timeout.

Signed-off-by: default avatarPetri Latvala <petri.latvala@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Reviewed-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
parent 51d069e0
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@ int main(int argc, char **argv)
struct settings settings;
struct job_list job_list;
struct execute_state state;
int exitcode = 0;
int dirfd;
init_settings(&settings);
......@@ -35,13 +36,21 @@ int main(int argc, char **argv)
}
if (!execute(&state, &settings, &job_list)) {
return 1;
exitcode = 1;
}
if (state.time_left == 0.0) {
/*
* Overall timeout happened. Results generation can
* override this
*/
exitcode = 2;
}
if (!generate_results_path(settings.results_path)) {
return 1;
exitcode = 1;
}
printf("Done.\n");
return 0;
return exitcode;
}
......@@ -32,6 +32,14 @@ int main(int argc, char **argv)
exitcode = 1;
}
if (state.time_left == 0.0) {
/*
* Overall timeout happened. Results generation can
* override this
*/
exitcode = 2;
}
if (!generate_results_path(settings.results_path)) {
exitcode = 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment