示例#1
0
 def output_refiners(self):
     result = super().output_refiners
     if self.test_env.get("fold_casing", False):
         result.append(ToLower())
     if self.test_env.get("canonicalize_backslashes", False):
         result.append(Substitute("\\", "/"))
     return result
示例#2
0
 def output_refiners(self):
     result = super().output_refiners + [ReplacePath(self.working_dir())]
     if self.env.fold_casing:
         result.append(ToLower())
     if self.test_env.get("canonicalize_backslashes", False):
         result.append(Substitute("\\", "/"))
     return result
示例#3
0
 def output_refiners(self):
     # Remove working directory from output and
     # make all filenames look like Unix ones (forward slashes for directory
     # separators).
     return [
         ReplacePath(self.working_dir(), replacement=""),
         Substitute('\\', '/')
     ]
示例#4
0
    def report_output_refiners(self):
        """
        When using the diff computing API (e.g. fail_if_diff), one needs to
        refine the actual output to ignore execution specific data (such as
        absolute paths, timestamps etc.). This function returns output refiners
        for gnatcov reports.

        TODO: this only implement refiners for xcov[+]?. Implement for other
        report formats when needed.
        """
        return [
            # Refiners for the xcov report
            Substitute(os.path.realpath(self.homedir), "<test_dir>"),

            # Ignore platform specificities
            CanonicalizeLineEndings(),
        ]