diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib-build-modes | 9 | ||||
-rwxr-xr-x | tests/pretend-pbuilder | 3 | ||||
-rwxr-xr-x | tests/setup/examplegit | 2 | ||||
-rwxr-xr-x | tests/tests/pbuilder | 2 | ||||
-rwxr-xr-x | tests/tests/push-buildproductsdir | 8 |
5 files changed, 19 insertions, 5 deletions
diff --git a/tests/lib-build-modes b/tests/lib-build-modes index bc8b2aa..27c5b06 100644 --- a/tests/lib-build-modes +++ b/tests/lib-build-modes @@ -38,6 +38,7 @@ bm-prep () { cleanmodes_default+=" dpkg-source$cleanmodes_dpkgsource_extra" cleanmodes_default+=" dpkg-source-d$cleanmodes_dpkgsource_extra" cleanmodes_all="$cleanmodes_default git-ff check" + cleanmodes_all+=" git,always git,always" cleanmodes="$cleanmodes_default" } @@ -148,8 +149,10 @@ bm-compute-expected () { # that too and reset eff_cleanmode to $cleanmode case $eff_cleanmode in - git) echo >&4 'BUILD-MODES PROGRAM git clean -xdf' ;; - git-ff) echo >&4 'BUILD-MODES PROGRAM git clean -xdff' ;; + git|Cgit,always) + echo >&4 'BUILD-MODES PROGRAM git clean -xdf' ;; + git-ff|Cgit-ff,always) + echo >&4 'BUILD-MODES PROGRAM git clean -xdff' ;; check|Ccheck) echo >&4 'BUILD-MODES PROGRAM git clean -dn -x' ;; dpkg-source-d|dpkg-source-d,no-check) echo >&4 "EXAMPLE RULES TARGET clean" @@ -160,7 +163,7 @@ bm-compute-expected () { ;; none|Cnone) ;; Cdpkg-source*) ;; # handled below - Cgit|Cgit-ff) ;; + Cgit|Cgit-ff) echo >&4 'BUILD-MODES PROGRAM git clean -dn' ;; *) fail "t-compute-expected-run $cleanmode ??" ;; esac diff --git a/tests/pretend-pbuilder b/tests/pretend-pbuilder index 8495a2f..1d39eb3 100755 --- a/tests/pretend-pbuilder +++ b/tests/pretend-pbuilder @@ -12,7 +12,8 @@ die "pbuilder: you should use me only to build, dgit" my $debbuildopts = undef; my $distribution = undef; GetOptions('debbuildopts=s' => \$debbuildopts, - 'distribution=s' => \$distribution); + 'distribution=s' => \$distribution) + or die; # ignore user args; last argument has to be the .dsc filename my $dsc = $ARGV[-1]; diff --git a/tests/setup/examplegit b/tests/setup/examplegit index 48864d4..88f6178 100755 --- a/tests/setup/examplegit +++ b/tests/setup/examplegit @@ -48,4 +48,6 @@ git add which t-commit Sid push-to master sid +git clean -xdff + t-setup-done 'p v suitespecs majorv revision' "aq git mirror $p" diff --git a/tests/tests/pbuilder b/tests/tests/pbuilder index 2c9dbae..56eed0b 100755 --- a/tests/tests/pbuilder +++ b/tests/tests/pbuilder @@ -23,7 +23,7 @@ t-dgit -v0 --pbuilder="$troot/pretend-pbuilder" pbuilder -b # it would be nice to try passing -g on the end of the following line # to confirm it gets massaged into -A, but the example package is # RC-buggy in that it doesn't build with -A .. -t-dgit -v0 --pbuilder="$troot/pretend-pbuilder" pbuilder +t-dgit -v0 --pbuilder="$troot/pretend-pbuilder" --pbuilder!:--no-source-only-changes pbuilder t-dgit -wgf push --new diff --git a/tests/tests/push-buildproductsdir b/tests/tests/push-buildproductsdir index 505d105..cc1c5e2 100755 --- a/tests/tests/push-buildproductsdir +++ b/tests/tests/push-buildproductsdir @@ -22,10 +22,18 @@ t-dgit --dpkg-buildpackage:-d build cd .. mkdir bpd mv $p*_* bpd/ +mv bpd/*orig* . cd $p t-dgit --build-products-dir=../bpd push t-pushed-good dgit/sid +cd .. +for f in ${p}_*.orig.*; do + in_ddd=$( stat -c %D:%i -L $f ) + in_bpd=$( stat -c %D:%i -L bpd/$f ) + test $in_ddd = $in_bpd +done + t-ok |