chiark / gitweb /
tests: Honour DGIT_TEST_INTREE
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 5 Nov 2014 21:23:14 +0000 (21:23 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 8 Nov 2014 22:22:20 +0000 (22:22 +0000)
debian/changelog
tests/lib
tests/using-intree

index a14811d..86acb72 100644 (file)
@@ -21,6 +21,8 @@ dgit (0.23~) unstable; urgency=low
   * dgit-repos-server: Handle ' ' in SSH_ORIGINAL_COMMAND (which some
     git versions send, sigh).
 
+  * Test suite restructuring to support new tests.
+
  --
 
 dgit (0.22.1) unstable; urgency=high
index 0133987..cccdc35 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -3,6 +3,12 @@
 exec 2>&1
 set -x
 
+if [ "x$DGIT_TEST_INTREE" != x ]; then
+       : ${DGIT_TEST:=$DGIT_TEST_INTREE/dgit}
+       : ${DGIT_REPOS_SERVER_TEST:=$DGIT_TEST_INTREE/dgit-repos-server}
+       export DGIT_TEST DGIT_REPOS_SERVER_TEST
+fi
+
 root=`pwd`
 troot=$root/tests
 testname="${DGIT_TEST_TESTNAME-${0##*/}}"
index 70d84e1..f20ec9d 100755 (executable)
@@ -1,6 +1,4 @@
 #!/bin/bash
 set -e
-tree=`pwd`
-export DGIT_TEST="$tree/dgit"
-export DGIT_REPOS_SERVER_TEST="$tree/dgit-repos-server"
+export DGIT_TEST_INTREE=`pwd`
 exec "$@"