Make CDash reporting easier to use (#9357)

* Better default CLI arguments for CDash reporting

--log-format=cdash is now implied if you specify the --cdash-upload-url
option to spack install.

We also now default to writing CTest XML files to cdash_report/ when using
the CDash reporter if no --log-file argument was specified.

* Improved documentation on how to use the CDash reporter
This commit is contained in:
Zack Galbreath 2018-10-11 01:29:14 -04:00 committed by Todd Gamblin
parent b18fea6c83
commit bc8bb9dfaf
2 changed files with 16 additions and 2 deletions

View file

@ -254,7 +254,11 @@ class collect_info(object):
""" """
def __init__(self, format_name, install_command, cdash_upload_url): def __init__(self, format_name, install_command, cdash_upload_url):
self.filename = None self.filename = None
self.format_name = format_name if cdash_upload_url:
self.format_name = 'cdash'
self.filename = 'cdash_report'
else:
self.format_name = format_name
# Check that the format is valid. # Check that the format is valid.
if self.format_name not in valid_formats: if self.format_name not in valid_formats:
raise ValueError('invalid report type: {0}' raise ValueError('invalid report type: {0}'

View file

@ -58,7 +58,17 @@
class CDash(Reporter): class CDash(Reporter):
"""Generate reports of spec installations for CDash.""" """Generate reports of spec installations for CDash.
To use this reporter, pass the ``--cdash-upload-url`` argument to
``spack install``::
spack install --cdash-upload-url=\\
https://mydomain.com/cdash/submit.php?project=Spack <spec>
In this example, results will be uploaded to the *Spack* project on the
CDash instance hosted at https://mydomain.com/cdash.
"""
def __init__(self, install_command, cdash_upload_url): def __init__(self, install_command, cdash_upload_url):
Reporter.__init__(self, install_command, cdash_upload_url) Reporter.__init__(self, install_command, cdash_upload_url)