From 8f46fcb51234b002566fdddf275607b453991232 Mon Sep 17 00:00:00 2001 From: Carson Woods Date: Thu, 27 Jun 2019 13:08:49 -0600 Subject: [PATCH] When running tests, disable shared mode because it will break other tests. Custom tests must be written --- lib/spack/spack/test/conftest.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index 53493eda910..5c5b3f84df7 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -38,6 +38,7 @@ from spack.fetch_strategy import FetchError from spack.spec import Spec from spack.version import Version +from spack.main import SpackCommand # @@ -61,6 +62,16 @@ def clean_user_environment(): ev.activate(active) +# +# Turn off Spack's shared mode if need be +# +@pytest.fixture(scope='session', autouse=True) +def disable_shared(): + if spack.config.get('config:shared'): + share = SpackCommand('share') + share('deactivate') + + # Hooks to add command line options or set other custom behaviors. # They must be placed here to be found by pytest. See: #