1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
| | = Unicorn integration test suite
These are all integration tests that start the server on random, unused
TCP ports or Unix domain sockets. They're all designed to run
concurrently with other tests to minimize test time, but tests may be
run independently as well.
New tests are written in Perl 5 because we need a stable language
to test real-world behavior and Ruby introduces incompatibilities
at a far faster rate than Perl 5. Perl is Ruby's older cousin, so
it should be easy-to-learn for Rubyists.
Old tests are in Bourne shell and slowly being ported to Perl 5.
== Requirements
* {Ruby 2.0.0+}[https://www.ruby-lang.org/en/]
* {Perl 5.14+}[https://www.perl.org/] # your distro should have it
* {GNU make}[https://www.gnu.org/software/make/]
* {curl}[https://curl.haxx.se/]
We do not use bashisms or any non-portable, non-POSIX constructs
in our shell code. We use the "pipefail" option if available and
mainly test with {ksh}[http://kornshell.com/], but occasionally
with {dash}[http://gondor.apana.org.au/~herbert/dash/] and
{bash}[https://www.gnu.org/software/bash/], too.
== Running Tests
To run the entire test suite with 8 tests running at once:
make -j8 && prove -vw
To run one individual test (Perl5):
prove -vw t/integration.t
To run one individual test (shell):
make t0000-simple-http.sh
You may also increase verbosity by setting the "V" variable for
GNU make. To disable trapping of stdout/stderr:
make V=1
To enable the "set -x" option in shell scripts to trace execution
make V=2
|