From: Jouni Malinen Date: Sun, 21 Dec 2014 16:20:15 +0000 (+0200) Subject: tests: Optimize test case execution order for multiple VMs X-Git-Tag: hostap_2_4~708 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ffbf34db04a2e4994d6728842bd74b79b14ce84;p=thirdparty%2Fhostap.git tests: Optimize test case execution order for multiple VMs 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 completed their work. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/vm/parallel-vm.py b/tests/hwsim/vm/parallel-vm.py index 2ef2d6ba4..a1e253c45 100755 --- a/tests/hwsim/vm/parallel-vm.py +++ b/tests/hwsim/vm/parallel-vm.py @@ -165,6 +165,30 @@ def main(): except: pass + if 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 + # completed their work. + long = [ "ap_wps_pbc_timeout", + "grpform_cred_ready_timeout", + "grpform_cred_ready_timeout2", + "discovery_pd_retries", + "ibss_wpa_none", + "concurrent_p2pcli", + "wpas_ap_wps", + "ibss_rsn", + "wext_pmksa_cache", + "ap_ht_40mhz_intolerant_ap", + "ap_wps_setup_locked_timeout", + "ap_vht160", + "dfs_radar", + "dfs" ] + for l in long: + if l in tests: + tests.remove(l) + tests.insert(0, l) + vm = {} for i in range(0, num_servers): print("\rStarting virtual machine {}/{}".format(i + 1, num_servers)),