Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: