X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Flib;h=5fcb6f656b82497e2726638c7ae2523bc5245064;hp=2c5d56ba681dc8343f5e05fdfba4670c2888967a;hb=6b959bf443c37b26f058aed813885c469c660828;hpb=1b72149044ab77e11215ab4780daa981c5c03225 diff --git a/tests/lib b/tests/lib index 2c5d56ba..5fcb6f65 100644 --- a/tests/lib +++ b/tests/lib @@ -321,7 +321,7 @@ t-archive () { local dscf=${p}_$2.dsc rm -f $tmp/mirror/pool/main/${p}_* ln $troot/pkg-srcs/${p}_${2%-*}* $tmp/mirror/pool/main/ - t-archive-query + t-archive-query $suite rm -rf $tmp/extract mkdir $tmp/extract (set -e; cd $tmp/extract; dpkg-source -x ../mirror/pool/main/$dscf) @@ -349,6 +349,25 @@ t-git-dir-check () { esac } +t-git-fsck () { + git fsck --no-dangling --strict || ${expect_fsck_fail-false} +} + +t-fscks () { + ( + shopt -s nullglob + for d in $tmp/*/.git $tmp/git/*.git; do + cd "$d" + t-git-fsck + done + ) +} + +t-ok () { + t-fscks + echo ok. +} + t-rm-dput-dropping () { rm -f $tmp/${p}_${v}_*.upload } @@ -759,6 +778,16 @@ t-tstunt-parsechangelog () { t-tstunt dpkg-parsechangelog Dpkg/Changelog/Parse.pm } +t-tstunt-lintian () { + t-tstunt lintian +} + +t-tstunt-debuild () { + : ${DGIT_TEST_REAL_DEBUILD:=$(type -p debuild)} + export DGIT_TEST_REAL_DEBUILD + t-tstunt debuild +} + t-incoming-dsc () { local dsc=${p}_${v}.dsc incoming_dsc=$tmp/incoming/$dsc @@ -845,7 +874,7 @@ t-gbp-example-prep () { t-commit () { local msg=$1 v=${2:-${majorv:-1}.$revision} - dch -v$v --distribution ${3:-unstable} "$1" + dch --force-distribution -v$v --distribution ${3:-unstable} "$1" git add debian/changelog debcommit revision=$(( ${revision-0} + 1 ))