Esempio n. 1
0
    def run(self, context):
        """Run tests."""
        testr_cmd = context["testr_cmd"]
        run_args = context.get("run_args", {})
        LOG.debug("Test(s) started by the command: '%s'.", " ".join(testr_cmd))
        stream = subprocess.Popen(testr_cmd, env=self.run_environ,
                                  cwd=self.repo_dir,
                                  stdout=subprocess.PIPE,
                                  stderr=subprocess.STDOUT)
        xfail_list = run_args.get("xfail_list")
        skip_list = run_args.get("skip_list")
        results = subunit_v2.parse(stream.stdout, live=True,
                                   expected_failures=xfail_list,
                                   skipped_tests=skip_list,
                                   logger_name=self.verifier.name)
        stream.wait()

        return results
Esempio n. 2
0
    def run(self, context):
        """Run tests."""
        testr_cmd = context["testr_cmd"]
        run_args = context.get("run_args", {})
        LOG.debug("Test(s) started by the command: '%s'."
                  % " ".join(testr_cmd))
        stream = subprocess.Popen(testr_cmd, env=self.run_environ,
                                  cwd=self.repo_dir,
                                  stdout=subprocess.PIPE,
                                  stderr=subprocess.STDOUT)
        xfail_list = run_args.get("xfail_list")
        skip_list = run_args.get("skip_list")
        results = subunit_v2.parse(stream.stdout, live=True,
                                   expected_failures=xfail_list,
                                   skipped_tests=skip_list,
                                   logger_name=self.verifier.name)
        stream.wait()

        return results
Esempio n. 3
0
 def parse_results(self, results_data):
     """Parse subunit results data of a test run."""
     # TODO(andreykurilin): Support more formats.
     return subunit_v2.parse(six.StringIO(results_data))
Esempio n. 4
0
 def parse_results(self, results_data):
     """Parse subunit results data of a test run."""
     # TODO(andreykurilin): Support more formats.
     return subunit_v2.parse(six.StringIO(results_data))