chiark / gitweb /
git-debrebase: merge: gdr-merge-conflicts test: New test
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 11 Aug 2018 16:01:52 +0000 (17:01 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 11 Aug 2018 17:34:50 +0000 (18:34 +0100)
Will be improved later.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/tests/control
tests/tests/gdr-merge-conflicts [new file with mode: 0755]

index 1a4f510..5949c80 100644 (file)
@@ -20,7 +20,7 @@ Tests: gdr-diverge-nmu gdr-diverge-nmu-dgit gdr-edits gdr-import-dgit gdr-import
 Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, git-debrebase, git-buildpackage, faketime
 
-Tests: gdr-merge gdr-newupstream gdr-viagit
+Tests: gdr-merge gdr-merge-conflicts gdr-newupstream gdr-viagit
 Tests-Directory: tests/tests
 Depends: chiark-utils-bin, git-debrebase, git-buildpackage, faketime
 
diff --git a/tests/tests/gdr-merge-conflicts b/tests/tests/gdr-merge-conflicts
new file mode 100755 (executable)
index 0000000..afdd014
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/bash
+set -e
+autoimport=
+. tests/lib
+
+t-dependencies NO-DGIT GDR
+
+t-tstunt-parsechangelog
+t-setup-import gdr-convert-gbp-noarchive
+
+: '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 other
+echo other-upstream-confict >>docs/README
+git commit -m 'other-upstream-conflict' docs/README
+
+t-git-debrebase quick
+
+git checkout master
+t-git-debrebase new-upstream 2.1
+
+t-merge-conflicted-stripping-conflict-markers other docs/README
+
+export GIT_DEBREBASE_EXPERIMENTAL_MERGE=1
+
+t-expect-fail F:'docs/README' \
+t-git-debrebase
+
+# xxx want to test a nomerge from first walk analysis half
+# xxx want to check wrecknotes appear
+
+t-ok