Skip to content
Snippets Groups Projects
Commit 28fd1baa authored by Massimiliano Culpo's avatar Massimiliano Culpo Committed by Todd Gamblin
Browse files

tests: run 'test_compiler_add' serially in Python 2 (#10127)

* Don't spawn processes during python 2.6/2.7 'test_compiler_add' unit tests
* Travis seems to choke on the excessive parallelism in `compiler find`
parent 39b23d27
No related branches found
No related tags found
No related merge requests found
...@@ -3,8 +3,11 @@ ...@@ -3,8 +3,11 @@
# #
# SPDX-License-Identifier: (Apache-2.0 OR MIT) # SPDX-License-Identifier: (Apache-2.0 OR MIT)
import sys
import pytest import pytest
import llnl.util.filesystem import llnl.util.filesystem
import llnl.util.multiproc
import spack.cmd.compiler import spack.cmd.compiler
import spack.compilers import spack.compilers
...@@ -55,7 +58,12 @@ def test_compiler_remove(self): ...@@ -55,7 +58,12 @@ def test_compiler_remove(self):
compilers = spack.compilers.all_compiler_specs() compilers = spack.compilers.all_compiler_specs()
assert spack.spec.CompilerSpec("gcc@4.5.0") not in compilers assert spack.spec.CompilerSpec("gcc@4.5.0") not in compilers
def test_compiler_add(self, mock_compiler_dir): def test_compiler_add(self, mock_compiler_dir, monkeypatch):
# This test randomly stall on Travis when spawning processes
# in Python 2.6 unit tests
if sys.version_info < (3, 0, 0):
monkeypatch.setattr(llnl.util.multiproc, 'parmap', map)
# Compilers available by default. # Compilers available by default.
old_compilers = set(spack.compilers.all_compiler_specs()) old_compilers = set(spack.compilers.all_compiler_specs())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment