Skip to content

Commit 9de33be

Browse files
committed
ci: tweak mpi setup to allow -s and hide output
1 parent cd836bc commit 9de33be

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

conftest.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,16 +142,28 @@ def parallel(item, m):
142142
raise ValueError("Can't run test: unexpected mode `%s`" % m)
143143

144144
pyversion = sys.executable
145+
146+
# Keep all invocation arguments up to test path
147+
params = item.config.invocation_params.args
148+
pyarg = []
149+
for p in params:
150+
if p.startswith('tests'):
151+
break
152+
else:
153+
pyarg.append(p)
154+
145155
# Only spew tracebacks on rank 0.
146156
# Run xfailing tests to ensure that errors are reported to calling process
147157
if item.cls is not None:
148158
testname = "%s::%s::%s" % (item.fspath, item.cls.__name__, item.name)
149159
else:
150160
testname = "%s::%s" % (item.fspath, item.name)
151-
args = ["-n", "1", pyversion, "-m", "pytest", "--runxfail", "-q", testname]
161+
162+
args = ["-n", "1", pyversion, "-m", "pytest", "--no-summary", *pyarg,
163+
"--runxfail", "-qq", testname]
152164
if nprocs > 1:
153165
args.extend([":", "-n", "%d" % (nprocs - 1), pyversion, "-m", "pytest",
154-
"--runxfail", "--tb=no", "-q", testname])
166+
"-s", "--runxfail", "--tb=no", "-qq", "--no-summary", testname])
155167
# OpenMPI requires an explicit flag for oversubscription. We need it as some
156168
# of the MPI tests will spawn lots of processes
157169
if mpi_distro == 'OpenMPI':

tests/test_linearize.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def test_interpolation_msf():
152152
assert op1.cfunction
153153

154154

155-
@pytest.mark.parallel(mode=[(1, 'diag2')])
155+
@pytest.mark.parallel(mode=[(2, 'diag2')])
156156
def test_codegen_quality0(mode):
157157
grid = Grid(shape=(4, 4))
158158
u = TimeFunction(name='u', grid=grid, space_order=2)
@@ -170,7 +170,6 @@ def test_codegen_quality0(mode):
170170
# for the efunc args
171171
# (the other three obviously are _POSIX_C_SOURCE, START, STOP)
172172
assert len(op._headers) == 6
173-
return "bonjour"
174173

175174

176175
def test_codegen_quality1():

0 commit comments

Comments
 (0)