some upgrade related fixups, plus a rule checking fixup
[gitolite-doc.git] / testing.mkd
blob735b8d3683fe67188e7d0c00c95f8052c32df5ea
1 % testing gitolite
3 # testing gitolite
5 include sidebar-toc
7 <font color="red">**WARNING: this will clobber [these files and
8 directories][clobber] in your `$HOME`.  Ideally, you should use a throwaway
9 userid**.</font>
11 Running gitolite's test suite is really just a superset of [trying it out
12 safely][trying].
14 To run the full test suite, create a **throw-away userid**, log in to it, then
15 run these commands:
17     git clone git://github.com/sitaramc/gitolite
18     cd gitolite
19     prove
21 You will get an error that forces you to read `t/README` and set an env var
22 before the test can proceed.  This is intentional; I've had people who don't
23 pay attention to the "data loss" warning, and then complain that it was not
24 prominent enough.  Forcing them to read a much smaller page appears to focus
25 their attention better!
27 The test suite should run fine on most recent Linuxes and Unixes.  Although
28 gitolite itself should work fine with any git after 1.6.6 or so, the test
29 suite generally requires a more recent git.
31 Make sure:
33   * `$HOME/bin` is in `$PATH`
34   * sshd allows incoming ssh to this userid, at least from localhost
36 Gitolite's test suite is mostly written using [tsh][] -- the "testing shell".
37 Take a look at some of the scripts and you will see what it looks like.  It
38 has a few quirks and nuances, but it's fine for what I need here.
40 [tsh]: http://github.com/sitaramc/tsh
42 The tests also use a somewhat convoluted system of environment variables in
43 order to run *entirely* as a local user, without going through ssh at all.
44 This lets a complete test suite run in about a lot less time than it would
45 otherwise take.
47 If you think that defeats the purpose of the testing, you haven't read
48 [this][auth] yet.
50 # appendix 1 -- the clobber list {#clobber}
52 When you [try out gitolite][trying] or run the test suite, the following files
53 and directories in your \$HOME are potentially clobbered.
55     .gitconfig
56     .gitolite/
57     .gitolite.rc
58     projects.list
59     repositories/
60     .ssh/