fix TEST_JOBS=auto max jobs detection 74/14874/2
authorKlement Sekera <ksekera@cisco.com>
Tue, 18 Sep 2018 12:32:27 +0000 (14:32 +0200)
committerDamjan Marion <dmarion@me.com>
Tue, 18 Sep 2018 19:37:47 +0000 (19:37 +0000)
Change-Id: I63f747e92d239e878550392df24fb7aac2b5a3e3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
test/run_tests.py

index 89c7797..a6fd64c 100644 (file)
@@ -614,7 +614,7 @@ if __name__ == '__main__':
             else:
                 extra_shm = shm_free - min_req_shm
                 shm_max_processes += extra_shm / shm_per_process
-            concurrent_tests = max(cpu_count(), shm_max_processes)
+            concurrent_tests = min(cpu_count(), shm_max_processes)
             print('Found enough resources to run tests with %s cores'
                   % concurrent_tests)
     elif test_jobs.isdigit():