[gnome-desktop-testing] Ensure we don't run exclusive tests until parallelizable tests are done



commit afcf629f9acd47976da7e28c1299fc5088e5c89e
Author: Colin Walters <walters verbum org>
Date:   Fri May 31 14:50:42 2013 -0400

    Ensure we don't run exclusive tests until parallelizable tests are done
    
    We previously weren't starting a new exclusive test if there was one
    running, but we also need to exclude parallelizable tests.

 src/gnome-desktop-testing-runner.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-desktop-testing-runner.c b/src/gnome-desktop-testing-runner.c
index ede3e13..0a2f75c 100755
--- a/src/gnome-desktop-testing-runner.c
+++ b/src/gnome-desktop-testing-runner.c
@@ -404,8 +404,16 @@ reschedule_tests (GCancellable *cancellable)
          && app->test_index < app->tests->len)
     {
       Test *test = app->tests->pdata[app->test_index];
+      g_assert (test->type != TEST_TYPE_UNKNOWN);
       if (test->type == TEST_TYPE_SESSION_EXCLUSIVE)
-        app->running_exclusive_test = TRUE;
+        {
+          /* If our next text is exclusive, wait until any other
+           * pending async tests have run.
+           */
+          if (app->pending_tests > 0)
+            break;
+          app->running_exclusive_test = TRUE;
+        }
       run_test_async (test, cancellable,
                       on_test_run_complete, NULL);
       app->pending_tests++;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]