summaryrefslogtreecommitdiff
path: root/runner/runner.c
diff options
context:
space:
mode:
authorPetri Latvala <petri.latvala@intel.com>2019-02-18 15:10:14 +0200
committerPetri Latvala <petri.latvala@intel.com>2019-02-19 10:36:39 +0200
commit368e76156f752e6ed6ac32ed9f400567aef7d3fc (patch)
tree4e0bcb8c12b9d7d2d48894b8ee7dd756bf674844 /runner/runner.c
parent51d069e07b3f7697f06fa8947ee92a196356d8b3 (diff)
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 <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'runner/runner.c')
-rw-r--r--runner/runner.c8
1 files changed, 8 insertions, 0 deletions
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;
}