summaryrefslogtreecommitdiff
path: root/tests/tests/gdr-merge
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-11 09:58:05 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-11 10:31:16 +0100
commit404b824d7a46eee9fe76398fda6a44a7e9cf3681 (patch)
treee56236e3f0b2dd98cacecc39cd30cb9203b0e9aa /tests/tests/gdr-merge
parent6afbad208f42c5f4b2f232988a7ed775b638ec7b (diff)
git-debrebase: test suite: New gdr-merge test
This still has a lot of xxx's, but as it is right now it passes, despite all the bugs. This seems like a reasonable baseline for more work. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/tests/gdr-merge')
-rwxr-xr-xtests/tests/gdr-merge70
1 files changed, 70 insertions, 0 deletions
diff --git a/tests/tests/gdr-merge b/tests/tests/gdr-merge
new file mode 100755
index 0000000..7a6ffdb
--- /dev/null
+++ b/tests/tests/gdr-merge
@@ -0,0 +1,70 @@
+#!/bin/bash
+set -e
+autoimport=
+. tests/lib
+
+t-dependencies NO-DGIT GDR
+
+t-tstunt-parsechangelog
+t-setup-import gdr-convert-gbp-noarchive
+
+: 'set up so t-git-debrebase runs gdr via git'
+
+case "$DGIT_GITDEBREBASE_TEST" in
+''|git-debrebase) ;;
+*)
+ t-tstunt
+ st=$tmp/tstunt/git-debrebase
+ export DGIT_GITDEBREBASE_TEST_REAL="$DGIT_GITDEBREBASE_TEST"
+ cat <<'END' >$st
+#!/bin/sh
+set -x
+exec "$DGIT_GITDEBREBASE_TEST_REAL" "$@"
+END
+ chmod +x $st
+ ;;
+esac
+
+DGIT_GITDEBREBASE_TEST='git debrebase'
+
+: 'do a simple test'
+
+cd $p
+
+t-gdr-prep-new-upstream 2.1
+git tag v2.1 upstream
+
+t-some-changes before
+t-git-debrebase quick
+
+git checkout -b other
+t-some-changes other '' -other
+
+git checkout master
+t-some-changes us-1 '' -us
+t-git-debrebase new-upstream 2.1
+t-some-changes us-2 '' -us
+t-git-debrebase quick
+
+git merge other
+
+t-some-changes after
+# xxx ^ commenting out this line produces an internal error
+
+t-expect-fail E:'general two-parent merge' \
+t-git-debrebase
+
+export GIT_DEBREBASE_EXPERIMENTAL_MERGE=1
+
+t-git-debrebase
+
+# xxx want to check that we DTRT if we start out unstitched -
+# xxx should consider our ffq-prev as a parent
+# xxx or should we ? it's not a parent of the merge is it ?
+# xxx => user should prefer to make merges when stitched ?
+# xxx think about this later
+
+# t-gdr-good laundered
+# xxx ^ this does not work
+
+t-ok