chiark / gitweb /
Test suite: Test --dgit-view-save everywhere
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 30 Oct 2016 16:26:00 +0000 (16:26 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 30 Oct 2016 19:50:48 +0000 (19:50 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/lib
tests/tests/overwrite-splitbrains
tests/tests/quilt-gbp
tests/tests/quilt-splitbrains

index 039484d0cb7711e9dd54c3cb3cfc662eeea21d20..caa69d0964d3c7b1e1aa377698eb0004668bb150 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -618,6 +618,13 @@ t-splitbrain-pushed-good-start () {
        git merge-base --is-ancestor $dep14tag $dgittag
 
        t-refs-same-start
        git merge-base --is-ancestor $dep14tag $dgittag
 
        t-refs-same-start
+       t-ref-same refs/heads/split.p
+       case "$(t-git-get-ref refs/heads/split.b)" in
+       "$t_ref_val") ;;
+       "$(git rev-parse refs/heads/split.p^0)") ;;
+       "$(git rev-parse refs/heads/split.p^1)") ;;
+       *) fail 'bad b/p' ;;
+       esac
        t-pushed-good-core
 
        t-incoming-dsc
        t-pushed-good-core
 
        t-incoming-dsc
index c0c7470d9d39c41320d6e46cac7124f7589e4110..725357d0790f581e5d29285297dd4f1c263de1b8 100755 (executable)
@@ -7,7 +7,7 @@ t-tstunt-parsechangelog
 t-gbp-example-prep-no-ff
 t-newtag
 
 t-gbp-example-prep-no-ff
 t-newtag
 
-t-dgit --quilt=gbp build-source
+t-dgit --quilt=gbp --dgit-view-save=split.b build-source
 
 t-dgit fetch
 
 
 t-dgit fetch
 
@@ -15,12 +15,12 @@ t-refs-same-start
 t-ref-head
 
 t-expect-fail 'check failed (maybe --overwrite is needed' \
 t-ref-head
 
 t-expect-fail 'check failed (maybe --overwrite is needed' \
-t-dgit --quilt=gbp push
+t-dgit --quilt=gbp --dgit-view-save=split.p push
 
 t-refs-same-start
 t-ref-head
 
 
 t-refs-same-start
 t-ref-head
 
-t-dgit --quilt=gbp --overwrite push
+t-dgit --quilt=gbp --dgit-view-save=split.p --overwrite push
 
 t-gbp-pushed-good
 
 
 t-gbp-pushed-good
 
index 21e396bc42bbcc9d04502942fd38d47c777d7696..38d2489b21bf43d242e06e1119303d3f73e93e25 100755 (executable)
@@ -14,7 +14,8 @@ t-expect-fail 'requires split view so server needs to support' \
 t-dgit -wgf --quilt=gbp build-source
 t-newtag
 
 t-dgit -wgf --quilt=gbp build-source
 t-newtag
 
-t-dgit --quilt=gbp build-source
+t-dgit --quilt=gbp --dgit-view-save=split.b1 build-source
+git rev-parse split.b1
 
 t-dgit --quilt=gbp --gbp-pq=no-such-command-gbp build-source
 
 
 t-dgit --quilt=gbp --gbp-pq=no-such-command-gbp build-source
 
@@ -31,14 +32,14 @@ test-push-1 () {
 }
 
 test-push-2 () {
 }
 
 test-push-2 () {
-       t-dgit --quilt=gbp push
+       t-dgit --quilt=gbp --dgit-view-save=split.p push
 
        t-gbp-pushed-good
 }
 
 test-push-1
 
 
        t-gbp-pushed-good
 }
 
 test-push-1
 
-t-dgit --quilt=gbp --clean=git build-source
+t-dgit --quilt=gbp --clean=git --dgit-view-save=split.b build-source
 
 t-expect-fail "HEAD specifies a different tree to $p" \
   t-dgit push
 
 t-expect-fail "HEAD specifies a different tree to $p" \
   t-dgit push
@@ -53,7 +54,7 @@ t-commit 'Check pseudomerge' 1.0-3
 
 test-push-1
 
 
 test-push-1
 
-t-dgit --quilt=gbp --clean=git build-source
+t-dgit --quilt=gbp --clean=git --dgit-view-save=split.b build-source
 
 test-push-2
 
 
 test-push-2
 
index 89d9fd393abea374916ecc1e31d7b39764ca90b0..112bc39eb0e35623cdf3eb33a81dbb999c041f5c 100755 (executable)
@@ -26,9 +26,9 @@ want-success () {
        t-refs-same-start
        t-ref-head
 
        t-refs-same-start
        t-ref-head
 
-       t-dgit "$@" --quilt=$qmode build-source
+       t-dgit "$@" --quilt=$qmode --dgit-view-save=split.b build-source
 
 
-       t-dgit "$@" --quilt=$qmode push
+       t-dgit "$@" --quilt=$qmode --dgit-view-save=split.p push
        t-$qmode-pushed-good
 }
 
        t-$qmode-pushed-good
 }