summaryrefslogtreecommitdiff
path: root/test/integration/test-ubuntu-bug-1078697-missing-source-hashes
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-09-13 17:25:23 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-09-14 15:22:19 +0200
commitc5ede4cac6e6496ce19ccea3313ac6b49ba5e8d6 (patch)
treef9175998cf276df229750904d637b8e58841a7cf /test/integration/test-ubuntu-bug-1078697-missing-source-hashes
parent9e4464914bcc5c896d81f7ca1948f9bfbfb50886 (diff)
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
Diffstat (limited to 'test/integration/test-ubuntu-bug-1078697-missing-source-hashes')
-rwxr-xr-xtest/integration/test-ubuntu-bug-1078697-missing-source-hashes11
1 files changed, 7 insertions, 4 deletions
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