submodule add: Fail when .git/modules/<name> already exists unless forced
[gitweb.git] / t / test-lib.sh
index aad46066adf0021b721bb3a2e235e2b012f13422..bff3d7570c675c7b6fbc71342909b0a930aae1a0 100644 (file)
@@ -51,6 +51,15 @@ then
 fi
 GIT_BUILD_DIR="$TEST_DIRECTORY"/..
 
+################################################################
+# It appears that people try to run tests without building...
+"$GIT_BUILD_DIR/git" >/dev/null
+if test $? != 1
+then
+       echo >&2 'error: you do not seem to have built git yet.'
+       exit 1
+fi
+
 . "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS
 export PERL_PATH SHELL_PATH