diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/quick.py | 7 | ||||
-rw-r--r-- | tests/spec/gl-1.0/blend.c | 23 |
2 files changed, 25 insertions, 5 deletions
diff --git a/tests/quick.py b/tests/quick.py index 53774e4db..73c467852 100644 --- a/tests/quick.py +++ b/tests/quick.py @@ -68,6 +68,13 @@ with profile.test_list.group_manager( with profile.test_list.allow_reassignment: g(['ext_texture_env_combine-combine', '--quick'], 'texture-env-combine') +# Set the --quick flag on the gl-1.0 blending test +with profile.test_list.group_manager( + PiglitGLTest, + grouptools.join('spec', '!opengl 1.0')) as g: + with profile.test_list.allow_reassignment: + g(['gl-1.0-blend-func', '--quick'], 'gl-1.0-blend-func') + # Limit texture size to 512x512 for some texture_multisample tests. # The default (max supported size) can be pretty slow. with profile.test_list.group_manager( diff --git a/tests/spec/gl-1.0/blend.c b/tests/spec/gl-1.0/blend.c index c1796a5e5..3c6a793e7 100644 --- a/tests/spec/gl-1.0/blend.c +++ b/tests/spec/gl-1.0/blend.c @@ -64,6 +64,8 @@ #define HUGE_STEP 1000 +static int test_stride = 1; + /* * We will check each pair of blend factors * for each pixel in a square image of this @@ -187,6 +189,13 @@ piglit_init(int argc, char **argv) const char* blend_rgb_tol = getenv("PIGLIT_BLEND_RGB_TOLERANCE"); const char* blend_alpha_tol = getenv("PIGLIT_BLEND_ALPHA_TOLERANCE"); + if (argc > 1 && strcmp(argv[1], "--quick") == 0) { + /* By default we run 27552 tests which is time consuming. + * With --quick we run only 1/20 (5%) of the tests. + */ + test_stride = 20; + } + /* * Hack: Make driver tests on incorrect hardware feasible * We want to be able to perform meaningful tests @@ -691,6 +700,7 @@ run_all_factor_sets(void) bool pass = true; int gl_version = piglit_get_gl_version(); int counter = 0; /* Number of tests we have done. */ + int test_number = 0; int step; int op, opa; int sf, sfa, df, dfa; @@ -788,11 +798,14 @@ run_all_factor_sets(void) for (dfa = 0; dfa < num_dst_factors_sep; dfa += step) { - pass &= proc_factors( - sf, sfa, - df, dfa, - &counter, - op, opa); + if (test_number % test_stride == 0) { + pass &= proc_factors( + sf, sfa, + df, dfa, + &counter, + op, opa); + } + test_number++; } } } |