From c2fd65dba35027a52696f497d414194514519d0f Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann?= Date: Wed, 4 Dec 2013 10:32:29 -0500 Subject: [PATCH] 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. --- test/pixel-test.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/pixel-test.c b/test/pixel-test.c index 1ff4d8c..9d2831d 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]); -- 2.34.1