Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=21838637c2718ef41e219f56787574f354004429
commit 21838637c2718ef41e219f56787574f354004429 Author: DeX77 <[email protected]> Date: Thu Nov 26 11:48:41 2015 +0100 * speedup for fpmcorrupt test diff --git a/t/fpmcorrupt b/t/fpmcorrupt index ec7717d..29fa522 100755 --- a/t/fpmcorrupt +++ b/t/fpmcorrupt @@ -1,27 +1,14 @@ #!/bin/bash if [ "$1" == "--help" ]; then - echo "corrupted packages (according to the fdb)" - exit 1 + echo "corrupted packages (according to the fdb)" + exit 1 fi -tmp=`mktemp -d` - cd .. for i in frugalware-* do - arch=${i#frugalware-} - cd $i - mkdir -p $tmp - tar xf frugalware-current.fdb -C $tmp - for j in `ls $tmp` - do - pkg=$j-$arch.fpm - # silently ignore, this is not fpmmissing - [ -f "$pkg" ] || continue - grep -q `sha1sum $pkg |sed 's/ .*//'` $tmp/$j/desc || \ - echo "$i/$pkg is corrupted" - done - rm -rf $tmp + cd $i || exit + find -type f -name "*.fpm" -print0 | xargs -0 -n 1 -P 16 -I{} ../t/verifypackage {} frugalware-current.fdb cd .. done diff --git a/t/verifypackage b/t/verifypackage new file mode 100755 index 0000000..5e8db31 --- /dev/null +++ b/t/verifypackage @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ "$#" -ne 2 ]; then + echo "Illegal number of parameters" + exit +fi + +xzgrep -q -a $(sha1sum $1 | cut -d ' ' -f1) $2 || echo "Recorded sha1sum for file $1 doesn't match" _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
