diff options
-rw-r--r-- | debian/tests/control | 2 | ||||
-rwxr-xr-x | tests/tests/unrepresentable | 33 | ||||
-rwxr-xr-x | tests/tests/unrepresentable-single-dpkg | 4 |
3 files changed, 29 insertions, 10 deletions
diff --git a/debian/tests/control b/debian/tests/control index 46ee740..e302632 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -96,7 +96,7 @@ Tests: trustingpolicy-replay Tests-Directory: tests/tests Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime, liburi-perl, dput-ng -Tests: absurd-gitapply badcommit-rewrite build-modes build-modes-long build-modes-source checkout clone-clogsigpipe debpolicy-dbretry debpolicy-newreject debpolicy-quilt-gbp debpolicy-taintrm defdistro-rpush defdistro-setup distropatches-reject dpkgsourceignores-correct drs-push-masterupdate drs-push-rejects dsd-divert fetch-localgitonly fetch-somegit-notlast forcesplit-linear forcesplit-overwrite gbp-orig gitconfig gitworktree import-dsc import-linkorigs import-maintmangle import-native import-nonnative import-tarbomb inarchivecopy mismatches-contents mismatches-dscchanges multisuite orig-include-exclude orig-include-exclude-chkquery overwrite-chkclog overwrite-junk overwrite-splitbrains overwrite-version pbuilder protocol-compat push-buildproductsdir push-newpackage push-newrepeat push-nextdgit push-source push-source-with-changes quilt quilt-gbp quilt-gbp-build-modes quilt-singlepatch quilt-splitbrains quilt-useremail rpush rpush-quilt sourceonlypolicy tag-updates unrepresentable version-opt +Tests: absurd-gitapply badcommit-rewrite build-modes build-modes-long build-modes-source checkout clone-clogsigpipe debpolicy-dbretry debpolicy-newreject debpolicy-quilt-gbp debpolicy-taintrm defdistro-rpush defdistro-setup distropatches-reject dpkgsourceignores-correct drs-push-masterupdate drs-push-rejects dsd-divert fetch-localgitonly fetch-somegit-notlast forcesplit-linear forcesplit-overwrite gbp-orig gitconfig gitworktree import-dsc import-linkorigs import-maintmangle import-native import-nonnative import-tarbomb inarchivecopy mismatches-contents mismatches-dscchanges multisuite orig-include-exclude orig-include-exclude-chkquery overwrite-chkclog overwrite-junk overwrite-splitbrains overwrite-version pbuilder protocol-compat push-buildproductsdir push-newpackage push-newrepeat push-nextdgit push-source push-source-with-changes quilt quilt-gbp quilt-gbp-build-modes quilt-singlepatch quilt-splitbrains quilt-useremail rpush rpush-quilt sourceonlypolicy tag-updates unrepresentable unrepresentable-single-dpkg version-opt Tests-Directory: tests/tests Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime, liburi-perl diff --git a/tests/tests/unrepresentable b/tests/tests/unrepresentable index fba0014..efd2d63 100755 --- a/tests/tests/unrepresentable +++ b/tests/tests/unrepresentable @@ -10,7 +10,19 @@ ln -s $troot/pkg-srcs/${p}_${v%-*}.orig.tar.* . cd $p +make_singlepatch () { + git checkout quilt-tip-1.1 + echo >debian/source/options single-debian-patch + git add debian/source/options + git commit -m single-debian-patch debian/source/options +} + quilt_mode=smash +case $DGIT_TEST_TESTNAME in + *-single-dpkg) make_singlepatch ;; + *-*) fail 'unknown test name' ;; + *) ;; +esac quilt-fixup () { t-dgit -wgf --quilt=$quilt_mode quilt-fixup @@ -48,7 +60,10 @@ start () { git checkout quilt-tip-1.1~0; } finish () { - expected=$1 + case "$DGIT_TEST_TESTNAME" in + *-single-dpkg) expected=${2-$1} ;; + *) expected=$1 ;; + esac case "$expected" in NOTHING) ;; @@ -91,35 +106,35 @@ finish () { start orig-symlink ln -sf NEWTARGET orig-symlink git add orig-symlink -finish EP:'modified symlink' +finish EP:'modified symlink' 'new version is symlink' start orig-symlink git rm -f orig-symlink -finish EP:'deletion of symlink' +finish EP:'deletion of symlink' LATE-EP:'Mode change from 20000 to 000000' start new ln -s hi new git add new -finish 'new version is symlink' +finish 'new version is symlink' 'new version is symlink' start src.c git rm src.c -finish GOOD:deleted +finish GOOD:deleted LATE-EP:'Mode change from 644 to 000000' start orig-exec git rm orig-exec -finish GOOD:'deleted exec' +finish GOOD:'deleted exec' LATE-EP:'Mode change from 755 to 000000' start orig-unwriteable git rm -f orig-unwriteable -finish GOOD:'deleted unwritable' +finish GOOD:'deleted unwritable' LATE-EP:'Mode change from 644 to 000000' start src.c chmod +x src.c git add src.c -finish 'EP:mode or type changed' +finish 'EP:mode or type changed' LATE-EP:'Mode change from 644 to 755' start nothing -finish NOTHING +finish NOTHING NOTHING t-ok diff --git a/tests/tests/unrepresentable-single-dpkg b/tests/tests/unrepresentable-single-dpkg new file mode 100755 index 0000000..f1ac270 --- /dev/null +++ b/tests/tests/unrepresentable-single-dpkg @@ -0,0 +1,4 @@ +#!/bin/bash +set -e +. tests/lib +t-chain-test unrepresentable |