@@ -22,46 +22,32 @@ usage() {
22
22
cat << eof
23
23
Usage: cylc test-battery [...]
24
24
25
- Run automated cylc and parsec tests under [FILES or DIRECTORIES].
26
- Test locations default to the following directory tree:
27
- $CYLC_DIR /tests/
25
+ Run automated Cylc and Parsec tests, under (by default):
26
+ $CYLC_DIR /tests/.
28
27
29
- Some tests (e.g. those specific to particular batch schedulers) can be
30
- configured in your site/user config file. A few others still submit jobs
31
- to a user@host account taken from the environment:
32
- \$ CYLC_TEST_TASK_HOST # default localhost
33
- \$ CYLC_TEST_TASK_OWNER # defaut \$ USER
28
+ Options and arguments are appended to "prove -j \$ NPROC -s -r \$ {@:-tests}".
29
+ NPROC is the number of concurrent processes to run, which defaults to the
30
+ global config "process pool size" setting.
34
31
35
- Requirements:
36
- * Passwordless ssh must be configured to task host accounts.
37
- * Some test suites submit jobs to 'at' so atd must be running.
32
+ The tests ignore normal site/user global config and instead use the file:
33
+ $CYLC_DIR /conf/global-tests.rc
34
+ This should specify test job hosts under the [test battery] section, plus any
35
+ other critical settings settings, including [hosts] configuration for test job
36
+ hosts (and special batchview commands like qcat if available). Additional
37
+ global config items can be added on the fly using the create_test_globalrc
38
+ shell function defined in the test_header.
38
39
39
- Options and arguments are appended to the "prove -j \$ NPROC -s -r \$ {@:-tests}"
40
- command, where NPROC is the number of child processes that can be used to run
41
- the test files.
40
+ Suite run directories are only cleaned up for passing tests on the suite host.
42
41
43
- Some tests use a clean global config file. If some items from your site config
44
- file are needed in this, e.g. to get remote test hosts working, add them to
45
- $CYLC_DIR /conf/global-tests.rc.
42
+ Set "export CYLC_TEST_DEBUG=true" to print failed-test stderr to the terminal.
46
43
47
- The command normally uses the "process pool size" setting (default=4) in the
48
- site/user global configuration file to determine the number of tests to run in
49
- parallel. You can also change the amount of concurrency with the "-j N" option.
44
+ To change the test file comparision command from "diff -u" do (for example):
45
+ export CYLC_TEST_DIFF_CMD='xxdiff -D'
50
46
51
- Suite run directories are cleaned up on the suite host for passing tests -
52
- otherwise they are left alone.
53
-
54
- To output stderr from failed tests to the terminal,
55
- "export CYLC_TEST_DEBUG=true" before running this command.
56
-
57
- The command normally uses "diff -u" to compare files. However, if an alternate
58
- command such as "xxdiff -D" is desirable (e.g. for debugging), "export
59
- CYLC_TEST_DIFF_CMD=xxdiff -D".
47
+ Some test suites submit jobs to the 'at' so atd must be up on the job hosts.
60
48
61
49
Commits or Pull Requests to cylc/cylc on GitHub will trigger Travis CI to run
62
50
generic (non platform-specific) tests - see $CYLC_DIR /.travis.yml.
63
- After enabling Travis CI for your own cylc fork, you can skip generic tests
64
- locally by setting CYLC_TEST_RUN_GENERIC=false.
65
51
66
52
By default all tests are executed. To run just a subset of them:
67
53
* list individual tests or test directories to run on the comand line
@@ -71,36 +57,34 @@ By default all tests are executed. To run just a subset of them:
71
57
List specific tests relative to $CYLC_DIR (i.e. starting with "test/").
72
58
Some platform-specific tests are automatically skipped, depending on platform.
73
59
74
- FOR DEVELOPERS:
75
- * Platform-specific tests must set "CYLC_TEST_IS_GENERIC=false" before
76
- sourcing the test_header.
77
- * Tests requiring the sqlite3 CLI must be skipped if sqlite3 is not installed
78
- (it is not otherwise a Cylc software prerequisite):
60
+ Platform-specific tests must set "CYLC_TEST_IS_GENERIC=false" before sourcing
61
+ the test_header.
62
+
63
+ Tests requiring the sqlite3 CLI must be skipped if sqlite3 is not installed (it
64
+ is not otherwise a Cylc software prerequisite):
79
65
| if ! which sqlite3 > /dev/null; then
80
66
| # Skip the remaining 3 tests.
81
67
| skip 3 "sqlite3 not installed?"
82
68
| purge_suite \$ SUITE_NAME
83
69
| exit 0
84
70
| fi
85
71
86
- For more information see "Reference Tests" in the User Guide.
87
-
88
72
Options:
89
73
-h, --help Print this help message and exit.
90
74
91
75
Examples:
92
76
93
77
Run the full test suite with the default options.
94
78
cylc test-battery
95
- Run the full test suite with 12 processes.
79
+ Run the full test suite with 12 processes
96
80
cylc test-battery -j 12
97
- Run only tests under "tests/cyclers/" with 12 processes.
98
- cylc test-battery -j 12 tests/cyclers
81
+ Run only tests under "tests/cyclers/"
82
+ cylc test-battery tests/cyclers
99
83
Run only "tests/cyclers/16-weekly.t" in verbose mode
100
84
cylc test-battery -v tests/cyclers/16-weekly.t
101
- Run only tests under "tests/cyclers/" with 12 processes , and skip 00-daily.t
85
+ Run only tests under "tests/cyclers/", and skip 00-daily.t
102
86
export CYLC_TEST_SKIP=tests/cyclers/00-daily.t
103
- cylc test-battery -j 12 tests/cyclers
87
+ cylc test-battery tests/cyclers
104
88
eof
105
89
}
106
90
0 commit comments