chiark / gitweb /
git-debrebase: test suite: gdr-viagit: new test
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 17 Feb 2018 20:44:53 +0000 (20:44 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 15:04:33 +0000 (16:04 +0100)
Have verified with this:

  diff --git a/tests/tests/gdr-viagit b/tests/tests/gdr-viagit
  index 55fe4d74..20576c23 100755
  --- a/tests/tests/gdr-viagit
  +++ b/tests/tests/gdr-viagit
  @@ -17,6 +17,7 @@ git-debrebase) ;;
  cat <<'END' >$st
   #!/bin/sh
   set -x
  +export GIT_DIR=$PWD/`git-rev-parse --git-dir`
   exec "$DGIT_GITDEBREBASE_TEST_REAL" "$@"
   END
  chmod +x $st

that this would indeed spot at least some problems.

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

index 05ea2dbdd5d1fe9b9cf8a59cb94be086464274f8..b324377110d433f6c6521aa0b53a182da914320e 100644 (file)
@@ -16,7 +16,7 @@ Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin
 Restrictions: x-dgit-intree-only x-dgit-git-only
 
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin
 Restrictions: x-dgit-intree-only x-dgit-git-only
 
-Tests: gdr-edits gdr-import-dgit
+Tests: gdr-edits gdr-import-dgit gdr-viagit
 Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, git-buildpackage, libfile-fnmatch-perl, faketime
 
 Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, git-buildpackage, libfile-fnmatch-perl, faketime
 
diff --git a/tests/tests/gdr-viagit b/tests/tests/gdr-viagit
new file mode 100755 (executable)
index 0000000..5f6e1d8
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/bash
+set -e
+. tests/lib
+
+t-dependencies git-buildpackage libfile-fnmatch-perl faketime
+
+t-setup-import gdr-convert-gbp
+
+: '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-some-changes
+
+t-git-debrebase
+t-gdr-good laundered
+
+t-git-debrebase stitch --prose=wombat
+t-gdr-good stitched
+
+t-ok