X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Flib-build-modes;h=cdf223d63e903eec1af8767e990cea32ba5ecb9a;hp=836d1ecef921e6c8e2ac30fa146691812fb3575f;hb=31995d0c8b6212275829a7e432821d5d94633ef5;hpb=cfec91c99eff2ed5d6e914b54ef81d9ddca78ca8 diff --git a/tests/lib-build-modes b/tests/lib-build-modes index 836d1ece..cdf223d6 100644 --- a/tests/lib-build-modes +++ b/tests/lib-build-modes @@ -20,14 +20,16 @@ exec git "$@" END chmod +x $tmp/stunt-git - counter=0 - if zgrep 'dpkg-buildpackage: Make dependency checks fatal for -S' \ /usr/share/doc/dpkg-dev/changelog.gz; then dpkgbuildpackage_deps_for_clean=true else dpkgbuildpackage_deps_for_clean=false fi + + cleanmodes_default="git none dpkg-source dpkg-source-d" + cleanmodes_all="$cleanmodes_default git-ff check" + cleanmodes="$cleanmodes_default" } bm-guess-e-source-e-targets () { @@ -95,15 +97,19 @@ bm-compute-expected () { bm-run-one () { local args="--clean=$cleanmode $real_act" - heading="===== [$counter $branch $cleanmode $act] dgit $args =====" + bmid="$act,$cleanmode,$branch" + bmid=${bmid// /_} - bmlog=$tmp/run-$counter-output - bmexp=$tmp/run-$counter-expected - bmgot=$tmp/run-$counter-results + heading="===== [$bmid] dgit $args =====" + + bmlog=$tmp/run.$bmid.output + bmexp=$tmp/run.$bmid.expected + bmgot=$tmp/run.$bmid.results bm-compute-expected git checkout $branch + git clean -xdf # since we might not do any actual cleaning dsc='../example_1.0.dsc' rm -f $dsc @@ -140,13 +146,10 @@ bm-run-one () { $bm_quirk_before_diff [ $actual_status = failure ] || diff -U10 $bmexp $bmgot - - counter=$(( $counter + 1 )) } bm-act-iterate () { - for cleanmode in git none dpkg-source dpkg-source-d; do - # git-ff check removed because they're really very similar + for cleanmode in $cleanmodes; do for branch in indep-arch bad-build-deps; do bm-run-one done