add loops arg
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 1 Oct 2009 09:04:02 +0000 (09:04 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 1 Oct 2009 09:04:02 +0000 (09:04 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/expedite@42836 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/main.c
src/bin/main.h

index 58590ab..7bed636 100644 (file)
@@ -9,6 +9,7 @@ struct _Evas_Object_Image_Preload
 
 Evas *evas = NULL;
 int win_w = 720, win_h = 420;
+int loops = LOOPS;
 
 static char *datadir = NULL;
 static int go = 1;
@@ -1172,6 +1173,11 @@ _profile_parse(int argc, char **argv)
                  return 0;
               }
          }
+       else if ((!strcmp(argv[i], "-c")) && (i < (argc - 1)))
+          {
+             i++;
+             loops = atoi(argv[i]);
+          }
      }
    return 1;
 }
@@ -1271,6 +1277,7 @@ _engine_args(int argc, char **argv)
                "Options:\n"
                "  -datadir path/to/data\n"
                "  -a (autorun all tests)\n"
+                "  -c NUM (loop count for test)\n"
                 "  -l (list tests)\n"
                "  -t TEST-NUM\n"
                "  -e ENGINE\n"
index 60d3579..e5f9bfb 100644 (file)
@@ -83,6 +83,7 @@ extern "C"
 
 extern Evas *evas;
 extern int   win_w, win_h;
+extern int   loops;
 
 void         srnd(void);
 unsigned int rnd(void);
@@ -103,7 +104,7 @@ int          engine_abort(void);
        }
 
 #define FPS_STD(x) \
-   if ((f >= LOOPS) && (!done)) \
+   if ((f >= loops) && (!done)) \
        { \
          double fps; \
          fps = (double)f / t; \