summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>2021-03-19 10:23:06 +0100
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>2021-04-01 10:46:51 +0200
commit94f9a31bde5aa28089178a6e6993466cf5c521d5 (patch)
tree6a00aaa6e2d00d24300902cd79bd8707e493e9f5
parent3d17b5946263d1440a98732c5567b6112164ba6d (diff)
shader_runner: run all the tests even if -report-subtests isn't used
Run all the tests and merge the results instead of silently running only the first one. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/493>
-rw-r--r--tests/shaders/shader_runner.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 0c88da56d..ce01db854 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -5631,10 +5631,11 @@ piglit_init(int argc, char **argv)
}
}
- /* Automatic mode can run multiple tests per session. */
- if (report_subtests) {
+ /* Run multiple tests per session. */
+ if (argc > 2) {
char testname[4096], *ext;
int i, j;
+ enum piglit_result all = PIGLIT_PASS;
for (i = 1; i < argc; i++) {
const char *hit, *filename = argv[i];
@@ -5811,7 +5812,7 @@ piglit_init(int argc, char **argv)
piglit_report_subtest_result(
result, "%s", testname);
} else {
- piglit_report_result(result);
+ piglit_merge_result(&all, result);
}
/* destroy GL objects? */
@@ -5821,6 +5822,8 @@ piglit_init(int argc, char **argv)
teardown_shader_include_paths();
teardown_xfb();
}
+ if (!report_subtests)
+ piglit_report_result(all);
exit(0);
}