]> granicus.if.org Git - curl/commitdiff
Allow running ./tests/testcurl.pl from within git repo.
authorBen Greear <greearb@candelatech.com>
Sun, 28 Mar 2010 05:50:07 +0000 (07:50 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 28 Mar 2010 20:57:52 +0000 (22:57 +0200)
My first instinct was to run the test script within the checked out
repository.  This small change to the script allows that to work as
expected.

Signed-off-by: Ben Greear <greearb@candelatech.com>
tests/testcurl.pl

index b48c2842e08a689a400a471f4afb7b14cab41a6b..c55dcaeef663ff4813a00eee9971024ea2e82614 100755 (executable)
@@ -78,6 +78,10 @@ $fixed=0;
 # Determine if we're running from git or a canned copy of curl,
 # or if we got a specific target option or setup file option.
 $CURLDIR="curl";
+if (-f ".git/config") {
+  $CURLDIR = "./";
+}
+
 $git=1;
 $setupfile = 'setup';
 while ($ARGV[0]) {