[Bug 52049] Update telepathy-gabble-tests to show pass/fail tests status
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Jul 20 18:57:26 CEST 2012
https://bugs.freedesktop.org/show_bug.cgi?id=52049
--- Comment #1 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2012-07-20 09:57:26 PDT ---
Comment on attachment 64169
--> https://bugs.freedesktop.org/attachment.cgi?id=64169
telepathy gabble tests pass/fail status
Review of attachment 64169:
--> (https://bugs.freedesktop.org/page.cgi?id=splinter.html&bug=52049&attachment=64169)
-----------------------------------------------------------------
::: tests/twisted/run-test.sh.in
@@ +20,5 @@
> sh @gabbletestsdir@/twisted/tools/with-session-bus.sh \
> --config-file=@gabbletestsdir@/twisted/tools/servicedir/tmp-session-bus.conf \
> -- \
> @PYTHON@ @gabbletestsdir@/twisted/$i
> + [ "$?" = 0 ] && echo "Result $i: pass" || echo "Result $i: fail"
If I was running the installed tests, I wouldn't want to have to grep the
results to find out which ones passed/failed. The script should exit nonzero if
a test fails.
There are two ways this could go: either exit nonzero as soon as a test fails,
or carry on testing, and exit nonzero if at least one test failed.
Also, exiting with status 77 is special in Automake tests: it indicates that
the test was skipped for some reason (neither success nor failure).
I'd prefer something like this:
any_failed=0
for i in $list; do
... run the test ...
e=$?
case "$e" in
(0)
echo "Result $i: pass"
;;
(77)
echo "Result $i: skip"
;;
(*)
any_failed=1
echo "Result $i: fail ($e)"
;;
esac
done
exit $any_failed
(Or if you want to exit as soon as a test fails, $any_failed is not needed, and
you can exit from the failure "case".)
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list