chiark / gitweb /
test suite: tagupl*: Drop use of --no-push
[dgit.git] / tests / lib-baredebian
index 768b0d5cd400fe4f6000bd62512933d786115e38..3ef6569d9474dc0ed9f973cfe9dfdc845dfda04f 100644 (file)
@@ -5,15 +5,32 @@ baredebian-test-vars () {
        v=1.0-1
        suite=sid
        uv=${v%-*}
+       uvtag=v$uv
+       origbase=${p}_${uv}.orig
+       xorigcomps=''
 }
 
-baredebian-test-core () {
+baredebian-tarball-mode () {
+       git tag -d $uvtag
+       uvtag=''
+       quiltmode=baredebian+tarball
+}
+
+baredebian-test-minimum () {
        t-expect-fail 'contradicts clean mode git-ff' \
        t-dgit -wgf --dgit-view-save=split.f1 --$quiltmode quilt-fixup
 
        t-dgit -wn --dgit-view-save=split.f1 --$quiltmode quilt-fixup
+}
 
-       tar --strip-components=1 -axf ../${p}_${uv}.orig.tar.*
+baredebian-test-core () {
+       tar --strip-components=1 -axf ../$origbase.tar.*
+       for comp in $xorigcomps; do
+               mkdir $comp
+               cd $comp
+               tar --strip-components=1 -axf ../../$origbase-$comp.tar.*
+               cd ..
+       done
 
        cd debian
        git clean -xdff
@@ -47,9 +64,11 @@ baredebian-test-core () {
        t-dgit -wn --quilt=$quiltmode --dgit-view-save=split.b quilt-fixup
        t-dgit -wn --quilt=$quiltmode --dgit-view-save=split.p --new push
 
-       git merge-base --is-ancestor v$uv split.p
        git merge-base --is-ancestor HEAD     split.p
-       set +e; git merge-base HEAD v$uv; rc=$?; set -e; [ $rc = 1 ]
+       if [ "$uvtag" ]; then
+               git merge-base --is-ancestor $uvtag split.p
+               set +e; git merge-base HEAD $uvtag; rc=$?; set -e; [ $rc = 1 ]
+       fi
 
        git clean -xdff
        # t-pushed-good-* wants a clean tree to start with, but this
@@ -69,5 +88,6 @@ baredebian-test-core () {
 
 baredebian-test () {
        baredebian-test-vars
+       baredebian-test-minimum
        baredebian-test-core
 }