# # # add_file "contrib/dump-test-logs.sh" # content [e8c725862bb8e18a11c8b93155fea908251d3c17] # # patch "debian/changelog" # from [89118785c13abb11285cb1315e6c16276f896dec] # to [25d7bfcd00f317192f6b04327b98b2c4658c826e] # # patch "debian/rules" # from [e1965c0a78f16a52051743e46214243cd0f235ca] # to [718c858ea1aedd36fdb162524688cb90225a09a3] # ============================================================ --- contrib/dump-test-logs.sh e8c725862bb8e18a11c8b93155fea908251d3c17 +++ contrib/dump-test-logs.sh e8c725862bb8e18a11c8b93155fea908251d3c17 @@ -0,0 +1,43 @@ +#! /bin/sh + +# Dump the detailed logs for all tests with an unexpected outcome to +# stdout. This is intended for use in super-automated build +# environments, e.g. the Debian build daemons, where the easiest way +# to recover detailed test logs for a failed build is to embed them in +# the overall 'make' output. Run, with no arguments, from the top +# level of a monotone build tree. + +set -e +cd tester_dir + +dumped=0 +for log in */*/tester.log +do + label=${log%/tester.log} + status=${log%/tester.log}/STATUS + + if [ -f "$status" ]; then + shorttag=$(cat "$status") + case "$shorttag" in + ok | skipped* | expected\ failure* | partial\ skip ) + continue ;; + esac + else + shorttag="no status file" + fi + + if [ $dumped -eq 0 ]; then + echo "### Detailed test logs:" + dumped=1 + fi + echo "### $label $shorttag" + cat "$log" +done + +# Exit unsuccessfully if we dumped anything, so that a driver Makefile +# can do something like +# +# make check || sh dump-test-logs.sh +# +# and have that fail the build just like plain "make check" would. +exit $dumped ============================================================ --- debian/changelog 89118785c13abb11285cb1315e6c16276f896dec +++ debian/changelog 25d7bfcd00f317192f6b04327b98b2c4658c826e @@ -1,7 +1,9 @@ monotone (0.40-2) unstable; urgency=low monotone (0.40-2) unstable; urgency=low * Automatically skip all tests involving netsync if it is impossible to use TCP on the loopback interface. (Closes: #474280) + * If the testsuite fails, dump the per-test logs for all failed + testcases into the main build log. * Install HTML documentation in /usr/share/doc/monotone/html, not /usr/share/doc/html. (Closes: #480072) @@ -17,7 +19,7 @@ monotone (0.40-1) unstable; urgency=low monotone (0.40-1) unstable; urgency=low [ Zack Weinberg ] - * New upstream release. + * New upstream release. (Closes: #482547) - Upstream "make distclean" now cleans up after "make html". (Closes: #473402) ============================================================ --- debian/rules e1965c0a78f16a52051743e46214243cd0f235ca +++ debian/rules 718c858ea1aedd36fdb162524688cb90225a09a3 @@ -87,8 +87,8 @@ ifeq "$(findstring nocheck, $(DEB_BUILD_ make -j$(CPUS) -C po all make -j$(CPUS) mtn ifeq "$(findstring nocheck, $(DEB_BUILD_OPTIONS))" "" - make -j$(CPUS) unit_tester tester - make check-local + make -j$(CPUS) unit_tester tester check_net + make check-local || sh contrib/dump-test-logs.sh endif touch $@