Displays unit tests stats correcly.
authorThomas Goirand <thomas@goirand.fr>
Tue, 1 Apr 2014 11:15:03 +0000 (19:15 +0800)
committerThomas Goirand <thomas@goirand.fr>
Tue, 1 Apr 2014 11:15:03 +0000 (19:15 +0800)
Change-Id: I08083535ea14c8668a3d120d39c6f2321a2a8434

Rewritten-From: 13088377474c18251aca8cca1e4399cf2bb88c45

trusty/debian/rules

index a7c8a708e5c991b7549cca01f5689af7770cc23e..a8b2bb685f4b93258fda35006af604a12940fb4e 100755 (executable)
@@ -39,7 +39,10 @@ override_dh_auto_test:
 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
        rm -rf .testrepository
        testr init
-       bash -x ./setup-test-env.sh testr run --subunit 'tests\.(?!.*test_bin.*)' | subunit2pyunit || true
+       set -e && \
+               TEMP_REZ=`mktemp -t` && \
+               bash -x ./setup-test-env.sh testr run --subunit 'tests\.(?!.*test_bin.*)' | subunit2pyunit || true ; \
+               cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats || true ; \
+               rm -f $$TEMP_REZ ;
        testr slowest
-       testr last --subunit | subunit-filter -s --no-passthrough | subunit-stats
 endif