test/testautomation.c
changeset 6830 0cd3e2e9b2c5
parent 6813 b21879e67db2
child 7191 75360622e65f
     1.1 --- a/test/testautomation.c	Sun Jan 27 20:37:14 2013 -0800
     1.2 +++ b/test/testautomation.c	Thu Jan 31 08:45:30 2013 -0800
     1.3 @@ -37,7 +37,8 @@
     1.4      Uint64 userExecKey = 0;
     1.5      char *userRunSeed = NULL;
     1.6      char *filter = NULL;
     1.7 -    int i;
     1.8 +    int i, done;
     1.9 +    SDL_Event event;
    1.10  
    1.11      /* Initialize test framework */
    1.12      state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
    1.13 @@ -103,6 +104,15 @@
    1.14      /* Call Harness */
    1.15      result = SDLTest_RunSuites(testSuites, (const char *)userRunSeed, userExecKey, (const char *)filter, testIterations);
    1.16  
    1.17 +    /* Empty event queue */    
    1.18 +    done = 0;
    1.19 +    for (i=0; i<100; i++)  {
    1.20 +      while (SDL_PollEvent(&event)) {
    1.21 +        SDLTest_CommonEvent(state, &event, &done);
    1.22 +      }
    1.23 +      SDL_Delay(10);
    1.24 +    }
    1.25 +
    1.26      /* Clean up */
    1.27      if (userRunSeed != NULL) {
    1.28          SDL_free(userRunSeed);