summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-10-30 16:26:00 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-10-30 19:50:48 +0000
commit946a01315097195bb25e1ea2b0a85ed495c822c4 (patch)
tree7f0176b651bb26be1c94ea3f8a6fe89d9658cb14 /tests
parent6359817c2baf67249782dc428c34c97e6a633b3b (diff)
Test suite: Test --dgit-view-save everywhere
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib7
-rwxr-xr-xtests/tests/overwrite-splitbrains6
-rwxr-xr-xtests/tests/quilt-gbp9
-rwxr-xr-xtests/tests/quilt-splitbrains4
4 files changed, 17 insertions, 9 deletions
diff --git a/tests/lib b/tests/lib
index 039484d..caa69d0 100644
--- 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
+ 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
diff --git a/tests/tests/overwrite-splitbrains b/tests/tests/overwrite-splitbrains
index c0c7470..725357d 100755
--- a/tests/tests/overwrite-splitbrains
+++ b/tests/tests/overwrite-splitbrains
@@ -7,7 +7,7 @@ t-tstunt-parsechangelog
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
@@ -15,12 +15,12 @@ t-refs-same-start
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-dgit --quilt=gbp --overwrite push
+t-dgit --quilt=gbp --dgit-view-save=split.p --overwrite push
t-gbp-pushed-good
diff --git a/tests/tests/quilt-gbp b/tests/tests/quilt-gbp
index 21e396b..38d2489 100755
--- a/tests/tests/quilt-gbp
+++ b/tests/tests/quilt-gbp
@@ -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 --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
@@ -31,14 +32,14 @@ test-push-1 () {
}
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-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
@@ -53,7 +54,7 @@ t-commit 'Check pseudomerge' 1.0-3
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
diff --git a/tests/tests/quilt-splitbrains b/tests/tests/quilt-splitbrains
index 89d9fd3..112bc39 100755
--- a/tests/tests/quilt-splitbrains
+++ b/tests/tests/quilt-splitbrains
@@ -26,9 +26,9 @@ want-success () {
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
}