summaryrefslogtreecommitdiff
path: root/lib/spack/spack/test/cmd/install.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/spack/test/cmd/install.py')
-rw-r--r--lib/spack/spack/test/cmd/install.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/spack/spack/test/cmd/install.py b/lib/spack/spack/test/cmd/install.py
index 904472f243..666d93020f 100644
--- a/lib/spack/spack/test/cmd/install.py
+++ b/lib/spack/spack/test/cmd/install.py
@@ -433,6 +433,29 @@ def test_cdash_upload_clean_build(tmpdir, mock_fetch, install_mockery,
@pytest.mark.disable_clean_stage_check
+def test_cdash_upload_extra_params(tmpdir, mock_fetch, install_mockery, capfd):
+ # capfd interferes with Spack's capturing
+ with capfd.disabled():
+ with tmpdir.as_cwd():
+ with pytest.raises((HTTPError, URLError)):
+ install(
+ '--log-file=cdash_reports',
+ '--cdash-build=my_custom_build',
+ '--cdash-site=my_custom_site',
+ '--cdash-track=my_custom_track',
+ '--cdash-upload-url=http://localhost/fakeurl/submit.php?project=Spack',
+ 'a')
+ report_dir = tmpdir.join('cdash_reports')
+ assert report_dir in tmpdir.listdir()
+ report_file = report_dir.join('Build.xml')
+ assert report_file in report_dir.listdir()
+ content = report_file.open().read()
+ assert 'Site BuildName="my_custom_build"' in content
+ assert 'Name="my_custom_site"' in content
+ assert '-my_custom_track' in content
+
+
+@pytest.mark.disable_clean_stage_check
def test_build_error_output(tmpdir, mock_fetch, install_mockery, capfd):
with capfd.disabled():
msg = ''