diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-06-28 13:51:02 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2018-12-10 15:34:01 -0800 |
commit | fec4979abda8c3ae70ce3eb0bc9e1f3b53c2a6a7 (patch) | |
tree | 55a399acba08ffd94994a3e37703959090b4d262 | |
parent | 014edbd2ab67094b4c9aeca6033125fc62665429 (diff) |
tests/ext_transform_feedback-max-varyings: fix result reporting
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.
-rw-r--r-- | tests/spec/ext_transform_feedback/max-varyings.c | 14 |
1 files 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) |