summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>2019-06-13 16:41:00 -0700
committerGitHub <noreply@github.com>2019-06-13 16:41:00 -0700
commit1b8f641016f1a2080ac1385f27ad038919ed2f83 (patch)
tree0019cc405e95ca73aa57314f5396c90a8f513773
parente275ddc1696b72de43a795581ac87488f4c80fbc (diff)
downloadspack-1b8f641016f1a2080ac1385f27ad038919ed2f83.tar.gz
spack-1b8f641016f1a2080ac1385f27ad038919ed2f83.tar.bz2
spack-1b8f641016f1a2080ac1385f27ad038919ed2f83.tar.xz
spack-1b8f641016f1a2080ac1385f27ad038919ed2f83.zip
Ensure mock configuration directory is cleaned up on session exit. (#11700)
-rw-r--r--lib/spack/spack/test/conftest.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py
index 0b02d9fe93..8fa5ff0e0e 100644
--- a/lib/spack/spack/test/conftest.py
+++ b/lib/spack/spack/test/conftest.py
@@ -293,7 +293,10 @@ def configuration_dir(tmpdir_factory, linux_os):
content = ''.join(compilers_yaml.read()).format(linux_os)
t = tmpdir.join('site', 'compilers.yaml')
t.write(content)
- return tmpdir
+ yield tmpdir
+
+ # Once done, cleanup the directory
+ shutil.rmtree(str(tmpdir))
@pytest.fixture(scope='module')