From 946a01315097195bb25e1ea2b0a85ed495c822c4 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 30 Oct 2016 16:26:00 +0000 Subject: [PATCH] Test suite: Test --dgit-view-save everywhere Signed-off-by: Ian Jackson --- tests/lib | 7 +++++++ tests/tests/overwrite-splitbrains | 6 +++--- tests/tests/quilt-gbp | 9 +++++---- tests/tests/quilt-splitbrains | 4 ++-- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/tests/lib b/tests/lib index 039484d0..caa69d09 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 c0c7470d..725357d0 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 21e396bc..38d2489b 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 89d9fd39..112bc39e 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 } -- 2.30.2