From 368e76156f752e6ed6ac32ed9f400567aef7d3fc Mon Sep 17 00:00:00 2001 From: Petri Latvala Date: Mon, 18 Feb 2019 15:10:14 +0200 Subject: 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: Petri Latvala Cc: Arkadiusz Hiler Cc: Tomi Sarvela Reviewed-by: Arkadiusz Hiler --- runner/runner.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'runner/runner.c') diff --git a/runner/runner.c b/runner/runner.c index 013af551..e1a6ccba 100644 --- a/runner/runner.c +++ b/runner/runner.c @@ -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; } -- cgit v1.2.3