summaryrefslogtreecommitdiff
path: root/tests/glean
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2013-11-20 11:00:09 -0700
committerBrian Paul <brianp@vmware.com>2013-11-21 11:37:57 -0700
commit3a5c3818251a10598e2b2a041be2c81d71c8df64 (patch)
tree6cec85ea0a63ba0f0e2038b23b2383ef5e350d86 /tests/glean
parenta607037c1ef4dc13dd43bb679c21669461d5adbf (diff)
glean/pixelformats: use test stride of 13 for --quick option
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'tests/glean')
-rw-r--r--tests/glean/tpixelformats.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/tests/glean/tpixelformats.cpp b/tests/glean/tpixelformats.cpp
index 3518ed1d8..27881bfd2 100644
--- a/tests/glean/tpixelformats.cpp
+++ b/tests/glean/tpixelformats.cpp
@@ -1560,11 +1560,16 @@ PixelFormatsTest::setup(void)
void
PixelFormatsTest::runOne(MultiTestResult &r, Window &w)
{
- int testNum = 0;
+ int testNum = 0, testStride;
(void) w; // silence warning
setup();
+ if (env->options.quick)
+ testStride = 13; // a prime number
+ else
+ testStride = 1;
+
const unsigned numEnvModes = haveCombine ? 2 : 1;
for (unsigned envMode = 0; envMode < numEnvModes; envMode++) {
@@ -1613,9 +1618,17 @@ PixelFormatsTest::runOne(MultiTestResult &r, Window &w)
env->log << " IntFormat: " << InternalFormats[intFormat].Name << "\n";
#endif
- bool ok = TestCombination(Formats[formatIndex].Token,
- Types[typeIndex].Token,
- InternalFormats[intFormat].Token);
+ bool ok;
+
+ if (testNum % testStride == 0) {
+ ok = TestCombination(Formats[formatIndex].Token,
+ Types[typeIndex].Token,
+ InternalFormats[intFormat].Token);
+ }
+ else {
+ // skip
+ ok = true;
+ }
if (!ok) {
// error was reported to log, add format info here: