e3.testsuite.report.gaia ======================== .. py:module:: e3.testsuite.report.gaia .. autoapi-nested-parse:: Helpers to generate testsuite reports compatible with GAIA. GAIA is AdaCore's internal Web analyzer. Attributes ---------- .. autoapisummary:: e3.testsuite.report.gaia.STATUS_MAP e3.testsuite.report.gaia.FAILURE_REASON_MAP Classes ------- .. autoapisummary:: e3.testsuite.report.gaia.GAIAResultFiles Functions --------- .. autoapisummary:: e3.testsuite.report.gaia.gaia_status e3.testsuite.report.gaia.dump_result_logs e3.testsuite.report.gaia.dump_result_logs_if_needed e3.testsuite.report.gaia.dump_discriminants e3.testsuite.report.gaia.dump_gaia_report Module Contents --------------- .. py:data:: STATUS_MAP Map TestStatus values to GAIA-compatible test statuses. .. py:data:: FAILURE_REASON_MAP Map FailureReason values to equivalent GAIA-compatible test statuses. .. py:function:: 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. :param status: Status for the result. :param failure_reasons: Set of failure reason for the result. .. py:class:: 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. .. py:attribute:: result :type: Optional[str] .. py:attribute:: log :type: Optional[str] .. py:attribute:: expected :type: Optional[str] .. py:attribute:: out :type: Optional[str] .. py:attribute:: diff :type: Optional[str] .. py:attribute:: time :type: Optional[str] .. py:attribute:: info :type: Optional[str] .. py:function:: dump_result_logs(result: e3.testsuite.result.TestResult, output_dir: str) -> GAIAResultFiles Write log files to describe a result in a GAIA report. :param result: Result to describe in the GAIA report. :param output_dir: Directory where to create the various files involved. .. py:function:: dump_result_logs_if_needed(env: e3.env.Env, result: e3.testsuite.result.TestResult, output_dir: str) -> Optional[GAIAResultFiles] Shortcut to call dump_result_logs if a GAIA report is requested. .. py:function:: dump_discriminants(discs: object, output_dir: str) -> None Dump discriminants for a GAIA-compatible testsuite report. :param 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. :param output_dir: Directory in which to emit the report. .. py:function:: dump_gaia_report(report_index: e3.testsuite.report.index.ReportIndex, output_dir: str, discs: object = None, result_files: Optional[Dict[str, GAIAResultFiles]] = None) -> None Dump a GAIA-compatible testsuite report. :param report_index: ReportIndex instance for all the test results to include in the report. :param output_dir: Directory in which to emit the report. :param discs: List of discriminants associated to the testsuite report, if any. See "dump_discriminants" for the expected format. :param result_files: If the log files for each result have already been generated, mapping from test names to result file names. None otherwise.