test/testautomation.c
changeset 6763 9cbd31a3450b
parent 6757 9935f71c8c81
child 6769 b49778d885cd
     1.1 --- a/test/testautomation.c	Thu Dec 20 08:50:36 2012 -0800
     1.2 +++ b/test/testautomation.c	Sat Dec 22 16:06:55 2012 -0800
     1.3 @@ -37,6 +37,7 @@
     1.4      int testIterations = 1;
     1.5      Uint64 userExecKey = 0;
     1.6      char *userRunSeed = NULL;
     1.7 +    char *filter = NULL;
     1.8      int i;
     1.9  
    1.10      /* Initialize test framework */
    1.11 @@ -74,6 +75,12 @@
    1.12                      consumed = 2;
    1.13                  }
    1.14              } 
    1.15 +            else if (SDL_strcasecmp(argv[i], "--filter") == 0) {
    1.16 +                if (argv[i + 1]) {
    1.17 +                    filter = SDL_strdup(argv[i + 1]);
    1.18 +                    consumed = 2;
    1.19 +                }
    1.20 +            } 
    1.21          }
    1.22          if (consumed < 0) {
    1.23              fprintf(stderr,
    1.24 @@ -98,12 +105,15 @@
    1.25      }
    1.26  
    1.27      /* Call Harness */
    1.28 -    result = SDLTest_RunSuites(testSuites, userRunSeed, userExecKey, testIterations);
    1.29 +    result = SDLTest_RunSuites(testSuites, userRunSeed, userExecKey, filter, testIterations);
    1.30  
    1.31      /* Clean up */
    1.32      if (userRunSeed != NULL) {
    1.33          SDL_free(userRunSeed);
    1.34      }
    1.35 +    if (filter != NULL) {
    1.36 +        SDL_free(filter);
    1.37 +    }
    1.38          
    1.39      /* Shutdown everything */
    1.40      quit(result);