summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann <ssp@redhat.com>2013-12-04 10:32:29 -0500
committerSøren Sandmann <ssp@redhat.com>2013-12-11 10:29:35 -0500
commitae959b5fd1c17efb22539f5a98f26794d1f0de5b (patch)
treea06cfa41301d453704aa4f49732e116483b52a0a
parent1e6286159e1ba38e45226919da7a70bc8d012b99 (diff)
pixel-test: Command line argument to specify the regression to run
A new command line argument allows the user to specify which one of the regressions should be run.
-rw-r--r--test/pixel-test.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/pixel-test.c b/test/pixel-test.c
index 1ff4d8c6..9d2831d6 100644
--- a/test/pixel-test.c
+++ b/test/pixel-test.c
@@ -302,8 +302,20 @@ main (int argc, char **argv)
{
int result = 0;
int i, j;
+ int lo, hi;
- for (i = 0; i < ARRAY_LENGTH (regressions); ++i)
+ if (argc > 1)
+ {
+ lo = atoi (argv[1]);
+ hi = lo + 1;
+ }
+ else
+ {
+ lo = 0;
+ hi = ARRAY_LENGTH (regressions);
+ }
+
+ for (i = lo; i < hi; ++i)
{
const pixel_combination_t *combination = &(regressions[i]);