X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=tests%2Flib-baredebian;h=557c051af0030de9bef8b1d91096b2735b23f781;hb=4bbb0ea95dcf9be8e26f19424ad3b5269a556783;hp=abec753af6c78f1ed8df7ddf12fc7b50518462ee;hpb=a49cc9d6a608f509e551bc954b24136bf48c33ba;p=dgit.git diff --git a/tests/lib-baredebian b/tests/lib-baredebian index abec753a..557c051a 100644 --- a/tests/lib-baredebian +++ b/tests/lib-baredebian @@ -6,6 +6,8 @@ baredebian-test-vars () { suite=sid uv=${v%-*} uvtag=v$uv + origbase=${p}_${uv}.orig + xorigcomps='' } baredebian-tarball-mode () { @@ -14,13 +16,21 @@ baredebian-tarball-mode () { quiltmode=baredebian+tarball } -baredebian-test-core () { +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-prepush () { + 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 @@ -46,14 +56,22 @@ baredebian-test-core () { git add debian/patches/. t-commit 'extra patch made with quilt' 1.0-2 + t-refs-same-start + t-ref-head + t-dgit -wn --quilt=$quiltmode --dgit-view-save=split.b quilt-fixup + t-ref-head +} + +baredebian-test-core-push () { dpkg-buildpackage -uc -us --build=source # ^ Do this by hand here not because we expect users to do this # (rather than dgit build), but so that we can check that our # output is the same as users are used to. - t-dgit -wn --quilt=$quiltmode --dgit-view-save=split.b quilt-fixup t-dgit -wn --quilt=$quiltmode --dgit-view-save=split.p --new push +} +baredebian-test-core-postpush () { git merge-base --is-ancestor HEAD split.p if [ "$uvtag" ]; then git merge-base --is-ancestor $uvtag split.p @@ -76,7 +94,14 @@ baredebian-test-core () { t-splitbrain-pushed-good-end-made-dep14 } +baredebian-test-core () { + baredebian-test-core-prepush + baredebian-test-core-push + baredebian-test-core-postpush +} + baredebian-test () { baredebian-test-vars + baredebian-test-minimum baredebian-test-core }