summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2018-12-26 08:47:46 +0100
committerTodd Gamblin <tgamblin@llnl.gov>2018-12-25 23:47:46 -0800
commit28fd1baa8648996e08b39c773cb0d38f5a688673 (patch)
treea56a023296458b8922c8a740202c28daf523131e /lib
parent39b23d277bc3f8a9f1c85b29fda413007b074427 (diff)
downloadspack-28fd1baa8648996e08b39c773cb0d38f5a688673.tar.gz
spack-28fd1baa8648996e08b39c773cb0d38f5a688673.tar.bz2
spack-28fd1baa8648996e08b39c773cb0d38f5a688673.tar.xz
spack-28fd1baa8648996e08b39c773cb0d38f5a688673.zip
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`
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/cmd/test_compiler_cmd.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/spack/spack/test/cmd/test_compiler_cmd.py b/lib/spack/spack/test/cmd/test_compiler_cmd.py
index 3ef12769f4..92b1a57b78 100644
--- a/lib/spack/spack/test/cmd/test_compiler_cmd.py
+++ b/lib/spack/spack/test/cmd/test_compiler_cmd.py
@@ -3,8 +3,11 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import sys
+
import pytest
import llnl.util.filesystem
+import llnl.util.multiproc
import spack.cmd.compiler
import spack.compilers
@@ -55,7 +58,12 @@ class TestCompilerCommand(object):
compilers = spack.compilers.all_compiler_specs()
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.
old_compilers = set(spack.compilers.all_compiler_specs())