[Piglit] [PATCH v2 13/19] tests/ext_transform_feedback-max-varyings: fix result reporting
Dylan Baker
dylan at pnwbakers.com
Mon Dec 3 18:13:52 UTC 2018
Currently if the first subtest failed then the second subtest (AoA)
would always report fail, this is bad. Instead we want to report fail,
but leave status (which is set to warn in the implementation doesn't
meet certain assumptions by the test), so that the second test can
report accurately.
---
tests/spec/ext_transform_feedback/max-varyings.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/tests/spec/ext_transform_feedback/max-varyings.c b/tests/spec/ext_transform_feedback/max-varyings.c
index b8c98a5d5..0d368cac7 100644
--- a/tests/spec/ext_transform_feedback/max-varyings.c
+++ b/tests/spec/ext_transform_feedback/max-varyings.c
@@ -416,10 +416,7 @@ piglit_display(void)
fs = get_fs(max_varyings);
pass = run_subtest(vs, fs, max_xfb_varyings,
max_varyings, xfb_varying_array);
- if (!pass) {
- status = PIGLIT_FAIL;
- }
- piglit_report_subtest_result(status,
+ piglit_report_subtest_result(pass ? status : PIGLIT_FAIL,
"max-varying-single-dimension-array");
/* Test arrays of arrays */
@@ -429,11 +426,8 @@ piglit_display(void)
fs = get_fs_aoa(max_varyings);
subtest_result = run_subtest(vs, fs, max_xfb_varyings,
max_varyings, xfb_varying_aoa);
- if (!subtest_result) {
- status = PIGLIT_FAIL;
- pass = false;
- }
- piglit_report_subtest_result(status,
+ pass &= subtest_result;
+ piglit_report_subtest_result(subtest_result ? status : PIGLIT_FAIL,
"max-varying-arrays-of-arrays");
} else {
piglit_report_subtest_result(PIGLIT_SKIP,
@@ -441,7 +435,7 @@ piglit_display(void)
}
piglit_present_results();
- return status;
+ return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
void piglit_init(int argc, char **argv)
--
2.19.2
More information about the Piglit
mailing list