support/testing: run testcases in parallel

Let the user to pass -t to set the number of testcases to run
simultaneously.

When -j is not specified, calculate it to split the available cores
between the simultaneous testcases.

Example of auto calculated -j for cpu_count 8:
  -t -j  total
   1  9  9
   2  4  8
   3  3  9
   4  2  8
 >=5  1  t

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Ricardo Martincoski
2017-06-28 23:45:48 -03:00
committed by Thomas Petazzoni
parent 1df8042ead
commit f98b93daaa
2 changed files with 18 additions and 1 deletions

View File

@@ -2,5 +2,4 @@
plugins = nose2.plugins.mp
[multiprocess]
processes = 1
always-on = True