From c5ede4cac6e6496ce19ccea3313ac6b49ba5e8d6 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 13 Sep 2015 17:25:23 +0200 Subject: tests: use SHA1 checksum only by default in tests This is mostly a small speedup for the testcases, but it is also handy to document which tests actually deal with a specific hash compared to those which 'just' need some hash which can be important while adding new hashes. Git-Dch: Ignore --- .../integration/test-ubuntu-bug-1078697-missing-source-hashes | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'test/integration/test-ubuntu-bug-1078697-missing-source-hashes') diff --git a/test/integration/test-ubuntu-bug-1078697-missing-source-hashes b/test/integration/test-ubuntu-bug-1078697-missing-source-hashes index 6fcb856b5..badc097b3 100755 --- a/test/integration/test-ubuntu-bug-1078697-missing-source-hashes +++ b/test/integration/test-ubuntu-bug-1078697-missing-source-hashes @@ -5,6 +5,7 @@ TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment configarchitecture "i386" +confighashes 'MD5' 'SHA1' 'SHA256' 'SHA512' msgtest 'Test apt-ftparchive source with missing hashes in .dsc' @@ -22,14 +23,16 @@ Files: EOF # check for the SHA hashes -aptftparchive sources aptarchive/ > aptarchive/Sources 2>/dev/null || msgfail -test -n "$(grep Checksums-Sha512 aptarchive/Sources)" && msgpass || msgfail +testsuccess aptftparchive sources aptarchive/ +cp rootdir/tmp/testsuccess.output aptarchive/Sources +testsuccess grep Checksums-Sha512 aptarchive/Sources for hash in sha512sum sha256sum sha1sum; do for f in foo_1.0.tar.gz foo_1.0.dsc; do SUM=$($hash aptarchive/$f | cut -d' ' -f1) - msgtest "Test $hash hash matches for $f" NEEDLE="$SUM $(stat -c%s aptarchive/$f) $f" - test -n "$SUM" && test -n "$(grep "$NEEDLE" aptarchive/Sources)" && msgpass || msgfail + testsuccess test -n "$SUM" + msgtest "Test $hash hash matches for $f" + testsuccess --nomsg grep "$NEEDLE" aptarchive/Sources done done -- cgit v1.2.3