summaryrefslogtreecommitdiff
path: root/selftest/format-subunit
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-10-02 18:40:44 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-10-02 18:40:44 +0200
commitd7edb40fca382ec822a7b17e4b47ecabb43e99d6 (patch)
tree21fa3b469331243ca7add27f80cfb3cc1f679786 /selftest/format-subunit
parent4ece674a99ff6c2ca0b6af435d2fcd488fb67d09 (diff)
downloadsamba-d7edb40fca382ec822a7b17e4b47ecabb43e99d6.tar.gz
samba-d7edb40fca382ec822a7b17e4b47ecabb43e99d6.tar.bz2
samba-d7edb40fca382ec822a7b17e4b47ecabb43e99d6.zip
format-subunit: Split out summary file writing.
Diffstat (limited to 'selftest/format-subunit')
-rwxr-xr-xselftest/format-subunit18
1 files changed, 11 insertions, 7 deletions
diff --git a/selftest/format-subunit b/selftest/format-subunit
index 9d660bfcbb..b927e95ae4 100755
--- a/selftest/format-subunit
+++ b/selftest/format-subunit
@@ -24,6 +24,10 @@ parser.add_option("--prefix", type="string", default=".",
opts, args = parser.parse_args()
+def handle_sigint(sig, stack):
+ sys.exit(0)
+signal.signal(signal.SIGINT, handle_sigint)
+
statistics = {
'SUITES_FAIL': 0,
'TESTS_UNEXPECTED_OK': 0,
@@ -34,15 +38,15 @@ statistics = {
'TESTS_SKIP': 0,
}
-def handle_sigint(sig, stack):
- sys.exit(0)
-signal.signal(signal.SIGINT, handle_sigint)
-
-msg_ops = subunithelper.PlainFormatter(os.path.join(opts.prefix, "summary"), opts.verbose,
- opts.immediate, statistics)
+msg_ops = subunithelper.PlainFormatter(opts.verbose, opts.immediate, statistics)
expected_ret = subunithelper.parse_results(msg_ops, statistics, sys.stdin)
-msg_ops.summary()
+summaryfile = os.path.join(opts.prefix, "summary")
+
+msg_ops.write_summary(summaryfile)
+
+print "\nA summary with detailed information can be found in:"
+print " %s" % summaryfile
sys.exit(expected_ret)