diff options
author | Petri Latvala <petri.latvala@intel.com> | 2019-01-22 12:47:23 +0200 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2019-01-22 14:26:21 +0200 |
commit | 96f3a1b876e0dd24706b85fb872f12031a436e84 (patch) | |
tree | eb4ef11df3f31ba7dc40605f46cdd24a6fa84dd6 /runner/executor.c | |
parent | 34e312999df75d6ac68ca7714b9137df56acc3f8 (diff) |
runner: Implement --dry-run
Actually implement --dry-run to not execute tests. With dry-run
active, attempting to execute will figure out the list of things to
execute, serialize them along with settings, and stop. This will be
useful for CI that wants to post-mortem on failed test rounds to
generate a list of tests that should have been executed and produce
json result files (full of 'notrun') for proper statistics.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Andi Shyti <andi.shyti@intel.com>
Cc: Martin Peres <martin.peres@linux.intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
Diffstat (limited to 'runner/executor.c')
-rw-r--r-- | runner/executor.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runner/executor.c b/runner/executor.c index 54c530b7..3f1eb010 100644 --- a/runner/executor.c +++ b/runner/executor.c @@ -1153,6 +1153,8 @@ bool initialize_execute_state(struct execute_state *state, init_time_left(state, settings); + state->dry = settings->dry_run; + return true; } @@ -1204,6 +1206,11 @@ bool execute(struct execute_state *state, double time_spent = 0.0; bool status = true; + if (state->dry) { + printf("Dry run, not executing. Invoke igt_resume if you want to execute.\n"); + return false; + } + if ((resdirfd = open(settings->results_path, O_DIRECTORY | O_RDONLY)) < 0) { /* Initialize state should have done this */ fprintf(stderr, "Error: Failure opening results path %s\n", |