GIT-VERSION-GEN: rewrite to manage RAINBOWS_VERSION const
[rainbows.git] / t / README
blob680e74edf5a6be583d82b8727f86e3f88f1851fd
1 = \Rainbows! test suite - YES OUR TEST SUITE IS CONCURRENT!
3 These are all integration tests that start the server on random, unused
4 TCP ports or Unix domain sockets.  They're all designed to run
5 concurrently with other tests to minimize test time, but tests may be
6 run independently as well.
8 We write our tests primarily in Bourne shell because that's what we're
9 comfortable writing integration tests with.  This test suite is also
10 easily portable to non-Ruby web servers.
12 == Requirements
14 * {Ruby 1.8 or 1.9}[http://www.ruby-lang.org/] (duh!)
15 * {isolate ~> 2.1.0}[http://github.com/jbarnette/isolate] - for dependencies
16 * {GNU make}[http://www.gnu.org/software/make/]
17 * {socat}[http://www.dest-unreach.org/socat/]
18 * {curl >= 7.18.0}[http://curl.haxx.se/]
19 * standard UNIX shell utilities (Bourne sh, awk, sed, grep, ...)
21 We do not use bashisms or any non-portable, non-POSIX constructs
22 in our shell code.  We use the "pipefail" option if available and
23 mainly test with {ksh}[http://kornshell.com/], but occasionally
24 with {dash}[http://gondor.apana.org.au/~herbert/dash/] and
25 {bash}[http://www.gnu.org/software/bash/], too.
27 == Running Tests
29 *BSD users: use "gmake" instead of "make"
31 To run the entire test suite with 8 tests running at once:
33   make -j8
35 To run one individual test for all concurrency models:
37   make t0000-simple-http.sh
39 To run one individual test for one concurrency model:
41   make Revactor.t0000-simple-http.sh
43 To run all tests for one concurrency model:
45   make EventMachine
47 You may also increase verbosity by setting the "V" variable for
48 GNU make.  To disable trapping of stdout/stderr:
50   make V=1
52 To enable the "set -x" option in shell scripts to trace execution
54   make V=2
56 == Performance
58 Some of the tests are rather I/O intensive due to the rewindability
59 requirement of "rack.input" in the Rack specification and the somewhat
60 complicated (but awesome!) nature of the TeeInput class leading us to
61 test it very heavily.  If you have lots of RAM and a large tmpfs
62 partition, it is advisable to set your TMPDIR and also make the t/trash/
63 directory a symlink to a directory inside in your TMPDIR.