summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2013-08-01 22:59:11 -0400
committerAllan McRae <allan@archlinux.org>2013-08-21 11:00:18 +1000
commit12e00af5315135a29a66c9aaa01e141a32d4634b (patch)
treea223d28c8c2e80d153f7e913703bb1bcce71e126 /test
parent403c175dbc84a8198b92bbe76f66eade613cff48 (diff)
downloadpacman-12e00af5315135a29a66c9aaa01e141a32d4634b.tar.xz
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 <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test')
-rwxr-xr-xtest/pacman/pactest.py3
-rw-r--r--test/pacman/pmenv.py69
2 files changed, 1 insertions, 71 deletions
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: