summaryrefslogtreecommitdiff
path: root/test/README
blob: 2c8423f8f95bf26ca329009ea8222472727e69fa (plain)
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
50
51
52
53
54
55
56
57
58
59
__COPYRIGHT__

This directory contains our end-to-end SCons tests.

They are all meant to be run essentially standalone, with the exception
of the TestSCons.py module and the other modules imported by the various
tests.  These modules are in the QMTest/ subdirectory, and PYTHONPATH
needs to be set up correctly so that the test scripts can find them,
and so that the SCons script itself can find the build engine modules.

There is a wrapper script, runtest.py, that takes care of this for you,
so the canonical invocation of a test is:

	python runtest.py test/option-x.py

There is also a "runtest.py -a" option that will search the tree for
all tests, and execute them.

Some of these tests have code for features that are not yet supported.

	commented out with a "#XXX" at the beginning of the line;

	short-circuited entirely by having the test pass via an
	early call to test.pass_test(), which has a "#XXX" comment
	at the end of the line

If you're trying to implement one of these features, DO NOT BLINDLY
ASSUME THAT THE NEW CODE IN THE TEST IS CORRECT.  It may have problems
that have gone undiscovered due to the fact that the code testing the
future feature couldn't be run yet!

We're not going to be dogmatic about it, but so that there's some
semblance of uniformity, here are the naming conventions for tests:

    --	All tests end with a .py suffix.

    --	General form:

    		Feature.py	test of specified feature; try to
				keep this description reasonably
				short

    		Feature-x.py	test of specified feature using
				option x

    --	Command line option tests take the form:

    		option-x.py	lower-case single-letter option

		option--X.py	upper-case single-letter option
				(extra hyphen so the file names will
				be unique on case-insensitive systems)

		option--lo.py	long option; abbreviate the long
				option name to a few characters

For some more information about running the tests and writing them, please
refer to the documentation for the testing framework. It can be found in
the 'QMTest' folder, as file 'test-framework.rst'.