diff options
Diffstat (limited to 't')
-rw-r--r-- | t/README | 8 | ||||
-rwxr-xr-x | t/basic.t (renamed from t/t01-basic) | 2 | ||||
-rwxr-xr-x | t/gitolite-receive-pack | 2 | ||||
-rwxr-xr-x | t/gitolite-upload-pack | 2 | ||||
-rwxr-xr-x | t/glt | 7 | ||||
-rwxr-xr-x | t/reset | 8 |
6 files changed, 24 insertions, 5 deletions
diff --git a/t/README b/t/README new file mode 100644 index 0000000..c863b41 --- /dev/null +++ b/t/README @@ -0,0 +1,8 @@ +WARNING: THE TEST SUITE DELETES STUFF FIRST! + +Testing gitolite3 is now one command after the clone: + + prove + +But because it starts by cleaning the slate, it's best to do it on a spare +userid that you are ok to lose data on. @@ -3,7 +3,7 @@ use strict; use warnings; # this is hardcoded; change it if needed -use lib "$ENV{HOME}/bin"; +use lib "src"; use Gitolite::Test; # basic tests diff --git a/t/gitolite-receive-pack b/t/gitolite-receive-pack index 48c7428..a4cc5be 100755 --- a/t/gitolite-receive-pack +++ b/t/gitolite-receive-pack @@ -9,4 +9,4 @@ $repo =~ s/\.git$//; my $user = $ENV{G3T_USER} || 'no-such-user'; $ENV{SSH_ORIGINAL_COMMAND} = "git-receive-pack '$repo'"; -exec( "$ENV{HOME}/bin/gitolite-shell", $user ); +exec( "$ENV{GL_BINDIR}/../src/gitolite-shell", $user ); diff --git a/t/gitolite-upload-pack b/t/gitolite-upload-pack index 8888abb..5981f17 100755 --- a/t/gitolite-upload-pack +++ b/t/gitolite-upload-pack @@ -9,4 +9,4 @@ $repo =~ s/\.git$//; my $user = $ENV{G3T_USER} || 'no-such-user'; $ENV{SSH_ORIGINAL_COMMAND} = "git-upload-pack '$repo'"; -exec( "$ENV{HOME}/bin/gitolite-shell", $user ); +exec( "$ENV{GL_BINDIR}/../src/gitolite-shell", $user ); @@ -2,6 +2,9 @@ use strict; use warnings; +use FindBin; +BEGIN { $ENV{GL_BINDIR} = $FindBin::RealBin; } + print STDERR "TRACE: glt(", join( ")(", @ARGV ), ")\n"; my $cmd = shift or die "need command"; @@ -10,9 +13,9 @@ my $rc; $ENV{G3T_USER} = $user; if ( $cmd eq 'push' ) { - $rc = system( "git", $cmd, "--receive-pack=$ENV{HOME}/bin/gitolite-receive-pack", @ARGV ); + $rc = system( "git", $cmd, "--receive-pack=$ENV{GL_BINDIR}/gitolite-receive-pack", @ARGV ); } else { - $rc = system( "git", $cmd, "--upload-pack=$ENV{HOME}/bin/gitolite-upload-pack", @ARGV ); + $rc = system( "git", $cmd, "--upload-pack=$ENV{GL_BINDIR}/gitolite-upload-pack", @ARGV ); } if ( $? == -1 ) { @@ -0,0 +1,8 @@ +#!/usr/bin/perl +use strict; +use warnings; + +# this is hardcoded; change it if needed +use lib "src"; +use Gitolite::Test; +try 'put'; |