]> xenbits.xensource.com Git - people/andrewcoop/xen-test-framework.git/commitdiff
xtf-runner: Sort tests by variation as well
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 28 Dec 2017 18:07:24 +0000 (18:07 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 28 Dec 2017 18:07:40 +0000 (18:07 +0000)
This removes instability in the running order of tests with multiple
variations.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xtf-runner

index 0c3addf5c9525df9fa1b5b8bfff02e05fa57d078..172cb1d56fa599505339cdc4be1ffed51c150a95 100755 (executable)
@@ -327,8 +327,9 @@ def tests_from_selection(cats, envs, tests):
             res = tests
 
     # Sort the results
-    res = sorted(res, key = lambda test: test.env)  # by environment second
-    res = sorted(res, key = lambda test: test.name) # by name first
+    res = sorted(res, key = lambda test: test.variation) # by variation third
+    res = sorted(res, key = lambda test: test.env)       # by environment second
+    res = sorted(res, key = lambda test: test.name)      # by name first
     return res