chiark / gitweb /
git tests use a private config file to avoid dependency on
authorRichard Kettlewell <rjk@greenend.org.uk>
Sat, 25 Jun 2011 11:15:47 +0000 (12:15 +0100)
committerRichard Kettlewell <rjk@greenend.org.uk>
Sat, 25 Jun 2011 11:15:47 +0000 (12:15 +0100)
(inconvenient, wrong or simply missing) user configuration.

tests/Makefile.am
tests/git-clone
tests/git.config [new file with mode: 0644]
tests/t-git

index 92308d5..3cb4cd3 100644 (file)
@@ -34,7 +34,7 @@ TESTS=t-version t-execute t-ltfilename t-utils t-xml t-pager t-editor \
        t-help t-errors \
        t-bzr t-cvs t-svn t-git t-hg t-darcs t-p4 \
        bzr-clone git-clone hg-clone
-EXTRA_DIST=utils.sh
+EXTRA_DIST=utils.sh git.config
 
 clean-local:
        rm -rf test-root
index e77d9f2..0273357 100755 (executable)
@@ -16,6 +16,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 set -e
 
+# Use a private config file so we're not reliant on user configuration
+export GIT_CONFIG=${top_srcdir:-.}/tests/git.config
+
 . ${top_srcdir:-.}/tests/utils.sh
 
 t_init git http://www.greenend.org.uk/rjk/git/example
diff --git a/tests/git.config b/tests/git.config
new file mode 100644 (file)
index 0000000..4fe53d2
--- /dev/null
@@ -0,0 +1,2 @@
+[user]
+       email = invalid@example.com
index 2d5289c..74503cd 100755 (executable)
@@ -16,6 +16,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 set -e
 
+# Use a private config file so we're not reliant on user configuration
+export GIT_CONFIG=${top_srcdir:-.}/tests/git.config
+
 . ${top_srcdir:-.}/tests/utils.sh
 
 # Check dependencies