diff options
author | Bhanuprakash Modem <bhanuprakash.modem@intel.com> | 2021-12-23 12:48:33 +0530 |
---|---|---|
committer | Bhanuprakash Modem <bhanuprakash.modem@intel.com> | 2021-12-23 17:06:43 +0530 |
commit | 15df505835e60dbdb9ddcbd800a4fab3120328f1 (patch) | |
tree | a0336cd2ebea64325bc3497ec16d5ec94a661d9d /tests/kms_color.c | |
parent | 8d1a587be11fb62e32fad1d29346fb78f4d9e499 (diff) |
tests/kms_color: Optimize ctm test execution
Instead of iterating through all the delta, break the execution
when we found a match. This will optimize the time required to
execute ctm-0-* tests.
Cc: Karthik B S <karthik.b.s@intel.com>
Cc: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
Diffstat (limited to 'tests/kms_color.c')
-rw-r--r-- | tests/kms_color.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/tests/kms_color.c b/tests/kms_color.c index 775f3596..854b8f3c 100644 --- a/tests/kms_color.c +++ b/tests/kms_color.c @@ -754,9 +754,11 @@ run_tests_for_pipe(data_t *data, enum pipe p) expected_colors[1].g = expected_colors[2].b = 0.25 + delta * (i - 2); - success |= test_pipe_ctm(data, primary, - red_green_blue, - expected_colors, ctm); + if (test_pipe_ctm(data, primary, red_green_blue, + expected_colors, ctm)) { + success = true; + break; + } } igt_assert(success); } @@ -776,9 +778,11 @@ run_tests_for_pipe(data_t *data, enum pipe p) expected_colors[1].g = expected_colors[2].b = 0.5 + delta * (i - 2); - success |= test_pipe_ctm(data, primary, - red_green_blue, - expected_colors, ctm); + if (test_pipe_ctm(data, primary, red_green_blue, + expected_colors, ctm)) { + success = true; + break; + } } igt_assert(success); } @@ -798,9 +802,11 @@ run_tests_for_pipe(data_t *data, enum pipe p) expected_colors[1].g = expected_colors[2].b = 0.75 + delta * (i - 3); - success |= test_pipe_ctm(data, primary, - red_green_blue, - expected_colors, ctm); + if (test_pipe_ctm(data, primary, red_green_blue, + expected_colors, ctm)) { + success = true; + break; + } } igt_assert(success); } |