]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Allow --shuffle-tests to be used with parallel-vm.py
authorJouni Malinen <j@w1.fi>
Tue, 3 Mar 2015 07:47:03 +0000 (09:47 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 3 Mar 2015 07:47:25 +0000 (09:47 +0200)
This can be used to get more random sequence of test case execution
into use when running multiple VMs.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/vm/parallel-vm.py

index ef6c07360c425c843976e5ddd509ce4710c9d2ed..13205fe8afcaf41f17f9841fad6a47a0efceafa1 100755 (executable)
@@ -307,7 +307,10 @@ def main():
     except:
         pass
 
-    if num_servers > 2 and len(tests) > 100:
+    if "--shuffle-tests" in extra_args:
+        from random import shuffle
+        shuffle(tests)
+    elif num_servers > 2 and len(tests) > 100:
         # Move test cases with long duration to the beginning as an
         # optimization to avoid last part of the test execution running a long
         # duration test case on a single VM while all other VMs have already