e3.testsuite.report.gaia
Helpers to generate testsuite reports compatible with GAIA.
GAIA is AdaCore’s internal Web analyzer.
Attributes
Map TestStatus values to GAIA-compatible test statuses. |
|
Map FailureReason values to equivalent GAIA-compatible test statuses. |
Classes
Filenames for a given result in a GAIA report. |
Functions
|
Return the GAIA-compatible status that describes a result the best. |
|
Write log files to describe a result in a GAIA report. |
|
Shortcut to call dump_result_logs if a GAIA report is requested. |
|
Dump discriminants for a GAIA-compatible testsuite report. |
|
Dump a GAIA-compatible testsuite report. |
Module Contents
- e3.testsuite.report.gaia.STATUS_MAP
Map TestStatus values to GAIA-compatible test statuses.
- e3.testsuite.report.gaia.FAILURE_REASON_MAP
Map FailureReason values to equivalent GAIA-compatible test statuses.
- e3.testsuite.report.gaia.gaia_status(status: e3.testsuite.result.TestStatus, failure_reasons: Set[e3.testsuite.result.FailureReason]) str
Return the GAIA-compatible status that describes a result the best.
- Parameters:
status – Status for the result.
failure_reasons – Set of failure reason for the result.
- class e3.testsuite.report.gaia.GAIAResultFiles
Filenames for a given result in a GAIA report.
In a GAIA testsuite report, each result is described as one entry (line) in the “results” text file, and several optional files. This object contains the names for the files, when present, corresponding to a given result.
- result: str | None
- log: str | None
- expected: str | None
- out: str | None
- diff: str | None
- time: str | None
- info: str | None
- e3.testsuite.report.gaia.dump_result_logs(result: e3.testsuite.result.TestResult, output_dir: str) GAIAResultFiles
Write log files to describe a result in a GAIA report.
- Parameters:
result – Result to describe in the GAIA report.
output_dir – Directory where to create the various files involved.
- e3.testsuite.report.gaia.dump_result_logs_if_needed(env: e3.env.Env, result: e3.testsuite.result.TestResult, output_dir: str) GAIAResultFiles | None
Shortcut to call dump_result_logs if a GAIA report is requested.
- e3.testsuite.report.gaia.dump_discriminants(discs: object, output_dir: str) None
Dump discriminants for a GAIA-compatible testsuite report.
- Parameters:
discs – List of discriminants to dump. Just like OptFileParse, accept either a string (comma-separated list of discriminant names) or a list of strings (list of discriminant names). Do nothing in other cases.
output_dir – Directory in which to emit the report.
- e3.testsuite.report.gaia.dump_gaia_report(report_index: e3.testsuite.report.index.ReportIndex, output_dir: str, discs: object = None, result_files: Dict[str, GAIAResultFiles] | None = None) None
Dump a GAIA-compatible testsuite report.
- Parameters:
report_index – ReportIndex instance for all the test results to include in the report.
output_dir – Directory in which to emit the report.
discs – List of discriminants associated to the testsuite report, if any. See “dump_discriminants” for the expected format.
result_files – If the log files for each result have already been generated, mapping from test names to result file names. None otherwise.