From 12e00af5315135a29a66c9aaa01e141a32d4634b Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Thu, 1 Aug 2013 22:59:11 -0400 Subject: pactest: remove results summary This functionality can be provided by a test harness. Having pactest output this information as well clutters the result log created by automake. Signed-off-by: Andrew Gregory Signed-off-by: Allan McRae --- test/pacman/pactest.py | 3 +-- test/pacman/pmenv.py | 69 -------------------------------------------------- 2 files changed, 1 insertion(+), 71 deletions(-) (limited to 'test/pacman') diff --git a/test/pacman/pactest.py b/test/pacman/pactest.py index e92864d7..d39fcaa5 100755 --- a/test/pacman/pactest.py +++ b/test/pacman/pactest.py @@ -105,9 +105,8 @@ if __name__ == "__main__": for i in opts.testcases: env.addtest(i) - # run tests and print overall results + # run tests env.run() - env.results() if not opts.keeproot: shutil.rmtree(root_path) diff --git a/test/pacman/pmenv.py b/test/pacman/pmenv.py index a3a8f54f..f358285a 100644 --- a/test/pacman/pmenv.py +++ b/test/pacman/pmenv.py @@ -61,7 +61,6 @@ class pmenv(object): """ tap.plan(len(self.testcases)) for t in self.testcases: - tap.diag("==========" * 8) tap.diag("Running '%s'" % t.testname) t.load() @@ -72,72 +71,4 @@ class pmenv(object): tap.todo = t.expectfailure tap.subtest(lambda: t.check(), t.description) - def results(self): - """ - """ - tpassed = [] - tfailed = [] - texpectedfail = [] - tunexpectedpass = [] - for test in self.testcases: - fail = test.result["fail"] - if fail == 0 and not test.expectfailure: - self.passed += 1 - tpassed.append(test) - elif fail != 0 and test.expectfailure: - self.expectedfail += 1 - texpectedfail.append(test) - elif fail == 0: # and not test.expectfail - self.unexpectedpass += 1 - tunexpectedpass.append(test) - else: - self.failed += 1 - tfailed.append(test) - - def _printtest(t): - success = t.result["success"] - fail = t.result["fail"] - rules = len(t.rules) - if fail == 0: - result = "[PASS]" - else: - result = "[FAIL]" - tap.diag("%s %s Rules: OK = %2u FAIL = %2u" \ - % (result, t.testname.ljust(34), success, fail)) - if fail != 0: - # print test description if test failed - tap.diag(" " + t.description) - - tap.diag("==========" * 8) - tap.diag("Results") - tap.diag("----------" * 8) - tap.diag(" Passed:") - for test in tpassed: - _printtest(test) - tap.diag("----------" * 8) - tap.diag(" Expected Failures:") - for test in texpectedfail: - _printtest(test) - tap.diag("----------" * 8) - tap.diag(" Unexpected Passes:") - for test in tunexpectedpass: - _printtest(test) - tap.diag("----------" * 8) - tap.diag(" Failed:") - for test in tfailed: - _printtest(test) - tap.diag("----------" * 8) - - total = len(self.testcases) - tap.diag("Total = %3u" % total) - if total: - tap.diag("Pass = %3u (%6.2f%%)" % (self.passed, - float(self.passed) * 100 / total)) - tap.diag("Expected Fail = %3u (%6.2f%%)" % (self.expectedfail, - float(self.expectedfail) * 100 / total)) - tap.diag("Unexpected Pass = %3u (%6.2f%%)" % (self.unexpectedpass, - float(self.unexpectedpass) * 100 / total)) - tap.diag("Fail = %3u (%6.2f%%)" % (self.failed, - float(self.failed) * 100 / total)) - # vim: set ts=4 sw=4 et: -- cgit v1.2.3-70-g09d2