spack.reporters package

class spack.reporters.CDash(configuration: CDashConfiguration)[source]

Bases: Reporter

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.

build_report(report_dir, specs)[source]
build_report_for_package(report_dir, package, duration)[source]
concretization_report(report_dir, msg)[source]
extract_standalone_test_data(package, phases, report_data)[source]

Extract stand-alone test outputs for the package.

finalize_report()[source]
initialize_report(report_dir)[source]
report_build_name(pkg_name)[source]
report_test_data(report_dir, package, phases, report_data)[source]

Generate and upload the test report(s) for the package.

success

Set to False if any error occurs when building the CDash report

test_report(report_dir, specs)[source]

Generate reports for each package in each spec.

test_report_for_package(report_dir, package, duration)[source]
test_skipped_report(report_dir: str, spec: Spec, reason: str | None = None)[source]

Explicitly report spec as being skipped (e.g., CI).

Examples are the installation failed or the package is known to have broken tests.

Parameters:
  • report_dir – directory where the report is to be written

  • spec – spec being tested

  • reason – optional reason the test is being skipped

upload(filename)[source]
class spack.reporters.CDashConfiguration(upload_url, packages, build, site, buildstamp, track)

Bases: tuple

build

Alias for field number 2

buildstamp

Alias for field number 4

packages

Alias for field number 1

site

Alias for field number 3

track

Alias for field number 5

upload_url

Alias for field number 0

class spack.reporters.JUnit[source]

Bases: Reporter

Generate reports of spec installations for JUnit.

build_report(filename, specs)[source]
concretization_report(filename, msg)[source]
test_report(filename, specs)[source]
class spack.reporters.Reporter[source]

Bases: object

Base class for report writers.

build_report(filename: str, specs: List[Dict[str, Any]])[source]
concretization_report(filename: str, msg: str)[source]
test_report(filename: str, specs: List[Dict[str, Any]])[source]

Submodules

spack.reporters.base module

class spack.reporters.base.Reporter[source]

Bases: object

Base class for report writers.

build_report(filename: str, specs: List[Dict[str, Any]])[source]
concretization_report(filename: str, msg: str)[source]
test_report(filename: str, specs: List[Dict[str, Any]])[source]

spack.reporters.cdash module

class spack.reporters.cdash.CDash(configuration: CDashConfiguration)[source]

Bases: Reporter

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.

buildIds: Dict[str, str]
build_report(report_dir, specs)[source]
build_report_for_package(report_dir, package, duration)[source]
concretization_report(report_dir, msg)[source]
extract_standalone_test_data(package, phases, report_data)[source]

Extract stand-alone test outputs for the package.

finalize_report()[source]
initialize_report(report_dir)[source]
report_build_name(pkg_name)[source]
report_test_data(report_dir, package, phases, report_data)[source]

Generate and upload the test report(s) for the package.

success

Set to False if any error occurs when building the CDash report

test_report(report_dir, specs)[source]

Generate reports for each package in each spec.

test_report_for_package(report_dir, package, duration)[source]
test_skipped_report(report_dir: str, spec: Spec, reason: str | None = None)[source]

Explicitly report spec as being skipped (e.g., CI).

Examples are the installation failed or the package is known to have broken tests.

Parameters:
  • report_dir – directory where the report is to be written

  • spec – spec being tested

  • reason – optional reason the test is being skipped

upload(filename)[source]
class spack.reporters.cdash.CDashConfiguration(upload_url, packages, build, site, buildstamp, track)

Bases: tuple

build

Alias for field number 2

buildstamp

Alias for field number 4

packages

Alias for field number 1

site

Alias for field number 3

track

Alias for field number 5

upload_url

Alias for field number 0

spack.reporters.cdash.build_stamp(track, timestamp)[source]

spack.reporters.extract module

spack.reporters.extract.add_part_output(part, line)[source]
spack.reporters.extract.elapsed(current, previous)[source]
spack.reporters.extract.expected_failure(line)[source]
spack.reporters.extract.extract_test_parts(default_name, outputs)[source]
spack.reporters.extract.new_part()[source]
spack.reporters.extract.part_name(source)[source]
spack.reporters.extract.process_part_end(part, curr_time, last_time)[source]
spack.reporters.extract.skip(line)[source]
spack.reporters.extract.status(line)[source]
spack.reporters.extract.timestamp(time_string)[source]

spack.reporters.junit module

class spack.reporters.junit.JUnit[source]

Bases: Reporter

Generate reports of spec installations for JUnit.

build_report(filename, specs)[source]
concretization_report(filename, msg)[source]
test_report(filename, specs)[source]