diff --git a/CHANGES b/CHANGES index 410d88c0a0..c627bd6f76 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +3145. [test] Capture output of ATF unit tests in "./atf.out" if + there were any errors while running them. [RT #25527] + 3144. [bug] dns_dbiterator_seek() could trigger an assert when used with a nonexistent database node. [RT #25358] diff --git a/lib/dns/tests/.cvsignore b/lib/dns/tests/.cvsignore index ee50e13466..6abab36d4a 100644 --- a/lib/dns/tests/.cvsignore +++ b/lib/dns/tests/.cvsignore @@ -1,2 +1,3 @@ Makefile +atf.out *_test diff --git a/lib/dns/tests/Makefile.in b/lib/dns/tests/Makefile.in index 5a8dd7040e..b8bd9dc128 100644 --- a/lib/dns/tests/Makefile.in +++ b/lib/dns/tests/Makefile.in @@ -12,7 +12,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.6 2011/08/23 00:59:23 each Exp $ +# $Id: Makefile.in,v 1.7 2011/08/23 01:29:38 each Exp $ srcdir = @srcdir@ VPATH = @srcdir@ @@ -76,3 +76,4 @@ unit:: clean distclean:: rm -f ${TARGETS} + rm -f atf.out diff --git a/lib/dns/tests/update_test.c b/lib/dns/tests/update_test.c index 07c2aa9687..934a4696b2 100644 --- a/lib/dns/tests/update_test.c +++ b/lib/dns/tests/update_test.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: update_test.c,v 1.4 2011/07/06 18:11:35 each Exp $ */ +/* $Id: update_test.c,v 1.5 2011/08/23 01:29:38 each Exp $ */ /* $Id: */ @@ -69,7 +69,7 @@ ATF_TC_BODY(increment, tc) { ATF_REQUIRE_EQ(result, ISC_R_SUCCESS); new = dns_update_soaserial(old, dns_updatemethod_increment); ATF_REQUIRE_EQ(isc_serial_lt(old, new), ISC_TRUE); - ATF_CHECK(new != 0); + ATF_CHECK_MSG(new != 0, "new (%d) should not equal 0", new); ATF_REQUIRE_EQ(new, 51); dns_test_end(); } diff --git a/lib/isc/tests/.cvsignore b/lib/isc/tests/.cvsignore index ee50e13466..6abab36d4a 100644 --- a/lib/isc/tests/.cvsignore +++ b/lib/isc/tests/.cvsignore @@ -1,2 +1,3 @@ Makefile +atf.out *_test diff --git a/lib/isc/tests/Makefile.in b/lib/isc/tests/Makefile.in index abe8cf82c9..88fb55a02e 100644 --- a/lib/isc/tests/Makefile.in +++ b/lib/isc/tests/Makefile.in @@ -12,7 +12,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.5 2011/08/23 00:59:23 each Exp $ +# $Id: Makefile.in,v 1.6 2011/08/23 01:29:38 each Exp $ srcdir = @srcdir@ VPATH = @srcdir@ @@ -59,3 +59,4 @@ unit:: clean distclean:: rm -f ${TARGETS} + rm -f atf.out diff --git a/unit/unittest.sh.in b/unit/unittest.sh.in index 8dd9897193..2b4f4b5b61 100644 --- a/unit/unittest.sh.in +++ b/unit/unittest.sh.in @@ -5,6 +5,8 @@ export PATH if [ -n "@ATFBIN@" ] then - # | cat is there to force non-fancy output - atf-run | atf-report | cat + atf-run > atf.out + status=$? + atf-report < atf.out + [ $status -eq 0 ] && rm -f atf.out fi