3 This directory contains test scripts that are useful for running a
4 bunch of tests all at once.
8 The available testsuites are obtained from a script, usually
9 selftest/samba{3,4}_tests.sh. This script should for each testsuite output
10 the name of the test, the command to run and the environment that should be
11 provided. Use the included "plantest" function to generate the required output.
18 The testsuites should exit with a non-zero exit code if at least one
19 test failed. Skipped tests should not influence the exit code.
23 Testsuites can simply use the exit code to indicate whether all of their
24 tests have succeeded or one or more have failed. It is also possible to
25 provide more granular information using the Subunit protocol.
27 This protocol works by writing simple messages to standard output. Any
28 messages that can not be interpreted by this protocol are considered comments
29 for the last announced test.
31 Accepted commands are:
37 Announce that a new test with the specified name is starting
43 Announce that the test with the specified name is done and ran successfully.
48 failure: <NAME> [ REASON ]
50 Announce that the test with the specified name failed. Optionally, it is
51 possible to specify a reason it failed.
53 The alias "fail" will also work.
58 xfail: <NAME> [ REASON ]
60 Announce that the test with the specified name failed but that the failure
61 was expected, e.g. it's a test for a known bug that hasn't been fixed yet.
62 Alternatively it is also possible to simply return "failure:" here but
63 specify in the samba4-knownfailures file that it is failing.
68 skip: <NAME> [ REASON ]
70 Announce that the test with the specified name was skipped. Optionally a
71 reason can be specified.
75 time: YYYY-MM-DD HH:mm:ssZ
77 Announce the current time. This may be used to calculate the duration of
84 Change the global prefix for test names. To unset the prefix, specify an empty
89 Tests often need to run against a server with particular things set up,
90 a "environment". This environment is provided by the test "target": Samba 3,
93 The following environments are currently available:
95 - none: No server set up, no variables set.
96 - dc: Domain controller set up. The following environment variables will
99 * USERNAME: Administrator user name
100 * PASSWORD: Administrator password
101 * DOMAIN: Domain name
103 * SERVER: DC host name
104 * SERVER_IP: DC IPv4 address
105 * NETBIOSNAME: DC NetBIOS name
106 * NETIOSALIAS: DC NetBIOS alias
108 - member: Domain controller and member server that is joined to it set up. The
109 following environment variables will be set:
111 * USERNAME: Domain administrator user name
112 * PASSWORD: Domain administrator password
113 * DOMAIN: Domain name
115 * SERVER: Name of the member server
121 To run all the tests use::
125 To run a quick subset (aiming for about 1 minute of testing) run::
129 To run a specific test, use this syntax::
131 make test TESTS=testname
135 make test TESTS=samba4.BASE-DELETE