From 9ed34f686fc605d2e5dfbb15b14ed8d63fdb7c72 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 1 Jan 2020 22:57:53 -0800 Subject: 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. --- lib/spack/spack/test/cmd/install.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3-60-g2f50