[igt-dev] [PATCH i-g-t] tests/kms_color_chamelium: time optimization
Kunal Joshi
kunal1.joshi at intel.com
Tue Nov 10 05:03:34 UTC 2020
Instead of going through all the delta even if we got success with one,
now breaking when we pass, thus saving some time and decreasing load on
chamelium for capturing the rest of the frames.
Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
---
tests/kms_color_chamelium.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/tests/kms_color_chamelium.c b/tests/kms_color_chamelium.c
index 310c021a..43bbe1f2 100644
--- a/tests/kms_color_chamelium.c
+++ b/tests/kms_color_chamelium.c
@@ -610,9 +610,9 @@ 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))
+ break;
}
igt_assert(success);
}
@@ -632,9 +632,9 @@ 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))
+ break;
}
igt_assert(success);
}
@@ -654,9 +654,9 @@ 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))
+ break;
}
igt_assert(success);
}
--
2.25.1
More information about the igt-dev
mailing list