1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Author: Michael R. Crusoe <crusoe@debian.org>
Description: Allow the tests to oversubscribe the available number of cores
Forwarded: not-needed
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,11 +1,16 @@
from logging import getLogger
+import os
import sys
import py
import pytest
log = getLogger(__name__)
-MPI_ARGS = ("mpirun", "-n")
+oversubscribe_option = os.environ.get("MPI_OVERSUBSCRIBE", "")
+if oversubscribe_option != "":
+ MPI_ARGS = ("mpirun", oversubscribe_option, "-n")
+else:
+ MPI_ARGS = ("mpirun", "-n")
PYTEST_ARGS = (sys.executable, "-mpytest")
|