summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2020-01-01 22:57:53 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2020-01-02 00:01:15 -0800
commit9ed34f686fc605d2e5dfbb15b14ed8d63fdb7c72 (patch)
tree375af528a6fc786a84fd35929da066ad6b2c8c0e /lib
parent4beb9fc5d36ab85cb5d2e43e451b26204f36cdcd (diff)
downloadspack-9ed34f686fc605d2e5dfbb15b14ed8d63fdb7c72.tar.gz
spack-9ed34f686fc605d2e5dfbb15b14ed8d63fdb7c72.tar.bz2
spack-9ed34f686fc605d2e5dfbb15b14ed8d63fdb7c72.tar.xz
spack-9ed34f686fc605d2e5dfbb15b14ed8d63fdb7c72.zip
bugfix: cdash tests shoudln't modify working directory
The latest cdash test creates a local cdash_reports directory, but it should do that in a tmpdir.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/cmd/install.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/spack/spack/test/cmd/install.py b/lib/spack/spack/test/cmd/install.py
index 55bc4a5a27..4c6c0860aa 100644
--- a/lib/spack/spack/test/cmd/install.py
+++ b/lib/spack/spack/test/cmd/install.py
@@ -678,11 +678,12 @@ def test_install_help_cdash(capsys):
@pytest.mark.disable_clean_stage_check
def test_cdash_auth_token(tmpdir, install_mockery, capfd):
# capfd interferes with Spack's capturing
- with capfd.disabled():
- os.environ['SPACK_CDASH_AUTH_TOKEN'] = 'asdf'
- out = install(
- '-v',
- '--log-file=cdash_reports',
- '--log-format=cdash',
- 'a')
- assert 'Using CDash auth token from environment' in out
+ with tmpdir.as_cwd():
+ with capfd.disabled():
+ os.environ['SPACK_CDASH_AUTH_TOKEN'] = 'asdf'
+ out = install(
+ '-v',
+ '--log-file=cdash_reports',
+ '--log-format=cdash',
+ 'a')
+ assert 'Using CDash auth token from environment' in out