[Pixman] [PATCH 04/13] pixel-test: Command line argument to specify the regression to run

Søren Sandmann sandmann at cs.au.dk
Wed Dec 11 07:41:53 PST 2013


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]);
 
-- 
1.8.3.1



More information about the Pixman mailing list