Permalink
Browse files

Bailout tests unless envvar $GITOLITE_TEST is 'y'

[committer made some changes to t/README]
  • Loading branch information...
1 parent 31166e1 commit ba67f6f9ca2a9152b3687348d71feedcc58f3ce6 @olof olof committed with Aug 9, 2012
Showing with 15 additions and 4 deletions.
  1. +6 −0 src/lib/Gitolite/Test.pm
  2. +9 −4 t/README
View
@@ -37,6 +37,12 @@ use warnings;
# ----------------------------------------------------------------------
+# make sure the user is ready for it
+if (not $ENV{GITOLITE_TEST} or $ENV{GITOLITE_TEST} ne 'y') {
+ print "Bail out! See t/README for information on how to run the tests.\n";
+ exit 255;
+}
+
# required preamble for all tests
try "
DEF gsh = /TRACE: gsh.SOC=/
View
@@ -1,8 +1,13 @@
+
+============================================
WARNING: THE TEST SUITE DELETES STUFF FIRST!
+============================================
+
+Please run the tests ONLY on a userid where it's ok to LOSE DATA.
-Testing gitolite3 is now one command after the clone:
+On such a userid, clone gitolite then run this command in the clone:
- prove
+ GITOLITE_TEST=y 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.
+http://sitaramc.github.com/gitolite/testing.html has more details. It will
+also help you try out gitolite if you want to go beyond just the test suite.

0 comments on commit ba67f6f

Please sign in to comment.