]> granicus.if.org Git - icinga2/blob - test/jenkins/README
Add configuration aware test runner
[icinga2] / test / jenkins / README
1 Set of scripts to set up and test a virtual demo machine
2 ========================================================
3
4 This directory contains a few scripts primarily used by build.icinga.org.
5
6 * bootstrap-vm.sh
7   Ensures that all required software is installed and its configuration
8   is applied to the VM. (Usually not of interest for the typical user.)
9
10 * run_tests.sh
11   This is a wrapper script intended to be ran manually by a user.
12
13 * run_tests.py
14   The actual test-runner. Accepts one option (-C|--config) and expects
15   one or more filenames or -patterns that should be run on the VM.
16
17 * run_tests.conf
18   The default configuration file for the test-runner. (Used when running
19   the wrapper script or when no custom configuration file is passed to the
20   test-runner.)
21
22   Format:
23   - commands: This section is mandatory and contains the commands to use.
24   - settings: This section is mandatory and defines settings that are applied to
25               all tests.
26   - setups: This section is optional and contains setup routines that should
27             be ran before (setup) and after (teardown) any matching test is
28             executed. (Note that only one setup can be effective at a time.)
29
30             Example:
31             "^v[1-9]\.test$": {
32                 "setup": {
33                     "copy": ["source >> target"], // Files that should be copied.
34                                                   // Note that these files remain
35                                                   // if not removed explicitly
36                     "clean": ["target"], // Files to delete from the system
37                     "exec": ["cmd1", "cmd2"] // Commands to execute on the system
38                 },
39                 "teardown": {
40                     // The same kind of instructions as above can be added here
41                 }
42             }