support/testing/run-tests: fix --testcases option
The --testcases option of run-tests says how many test cases to build in parallel. It automatically derives a jlevel from it by dividing the number of cores + 1 by the number of parallel testcases. However, this will typically result in a fractional number. Make doesn't like fractional numbers as argument to -j. Convert the number to integer (rounding down). * br2_jlevel is an int, as multiprocessing.cpu_count() is an int, so it will be always >=2 (cpu_count() raises an error if it can't determine the number of CPU, so it will always return at least 1); * args.testcases is an int, and is checked to be >=1 So br2_jlevel + args.testcases is guaranteed to always be bigger than or equal to args.testcases, and the division thus bigger than 1. Signed-off-by:Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> [yann.morin.1998@free.fr: - ensure division provide at least 1 - drop the test below ] Signed-off-by:
Yann E. MORIN <yann.morin.1998@free.fr>
Loading
Please register or sign in to comment