]> git.sur5r.net Git - bacula/bacula/blob - regress/README.ctest
Commit Frank's patch
[bacula/bacula] / regress / README.ctest
1
2 Bacula Regression Suite and CTest
3 ==================================================================
4
5 The Bacula regression scripts have now been modified to use the ctest component
6 of cmake.  The major gain from this, since Bacula already had a working test
7 framework in place, is the ability to have the results of each test submitted
8 to a centralized dashboard system.  All of the test results are aggregated and
9 summarized, where all of the developers can quickly see how the regression
10 tests are running.
11
12 How to Use CTest
13 ==================================================================
14
15 For more complete documentation on ctest, go to:
16
17 http://www.cmake.org/Wiki/CMake#CTest
18
19 The first step is to install the cmake package, which includes ctest.  If your
20 distribution does already package it, you can download it directly from the
21 source:
22
23 http://www.cmake.org
24
25 Next, you must edit your regression config file and add a paramter called
26 SITE_NAME to identify the machine running the tests.  Ideally, it should
27 contain something to identify yourself to whoever is viewing the test results
28 as well as something to allow you to identify which machine is running the
29 tests, ie
30
31 SITE_NAME=kern-bacula-gumbie
32
33 Once you have cmake installed, you can perform one of two different kinds of
34 runs to submit test results.  The most common kind will be Nightly runs.  A
35 Nightly CTest backup will update the source directory (as defined by the
36 BACULA_SOURCE setting in your config file) to the current version, run the
37 specified list of tests, and submit all of the results to the server.  Note
38 that all of the results in a given 24 hour period (starting at 9pm EST) are
39 lumped together to appear as a single block, rather than each test showing up
40 as a different run.
41
42 The simplest way to trigger a nightly run is to use one of the two provided
43 scripts.  The nightly-all script will run all non root tests, both tape and
44 disk based, while the nightly-disk script will run only the disk based tests.
45
46 Periodically, however, you may want to submit a single test separately from a
47 weekly run.  This may be a test of a particular patch you're working on, or
48 perhaps a new OS patch.  For these one-shot tests, you will want to manually
49 run ctest in Experimental mode, something like:
50
51 REGRESS_DEBUG=1 ctest -D Experimental -R all-non-root:auto-label-test
52
53 The '-D Experimental' option tells ctest to submit the test results as
54 Experimental instead of Nightly.  We reccomend you use the REGRESS_DEBUG
55 environmental variable to ensure that any errors from the test are logged in
56 the dashboard (all of the ctest wrapper scripts set it).  The '-R <pattern>'
57 option gives ctest a regular expression.  Any tests with a name as defined in
58 DartTestfile.txt that matches the pattern will be run.
59
60 Note that you must have run ./scripts/do_sed at least once already in order to
61 use Experimental mode.
62
63 Updating and Building Within CTest
64 ==================================================================
65
66 Before each Nightly run, ctest will automatically update the BACULA_SOURCE
67 directory, and submit these updates along with the test results.  Any
68 Experimental runs will not.
69
70 Before either type of run actually begins running tests, ctest will run the
71 script scripts/update-ctest.  This script first compares the svn version of
72 BUILD_SOURCE with that of the build/ directory.  If the two versions differ, or
73 if the build/ directory does not exist, it will automatically run 'make setup'
74 for you.
75
76 Viewing the Dashboard
77 ==================================================================
78
79 You can view the dashboard at:
80
81 http://regress.bacula.org:8081
82
83 Results will not be visible as soon as they are submitted to the server.
84 Processing is currently done every 10 minutes, so you may have to wait up to 15
85 minutes or so before your results show up.
86