aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/README8
-rwxr-xr-xt/basic.t (renamed from t/t01-basic)2
-rwxr-xr-xt/gitolite-receive-pack2
-rwxr-xr-xt/gitolite-upload-pack2
-rwxr-xr-xt/glt7
-rwxr-xr-xt/reset8
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.
diff --git a/t/t01-basic b/t/basic.t
index 83508a9..96c4012 100755
--- a/t/t01-basic
+++ b/t/basic.t
@@ -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 );
diff --git a/t/glt b/t/glt
index b5704f5..45e7b19 100755
--- a/t/glt
+++ b/t/glt
@@ -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 ) {
diff --git a/t/reset b/t/reset
new file mode 100755
index 0000000..8c5dcbf
--- /dev/null
+++ b/t/reset
@@ -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';