1 Description of Testcases for OMK
2 ================================
4 Each test resides in a separate directory. The directories can be
5 nested. There is no difference between the tests in different levels of
8 Structure of a Testcase
9 -----------------------
11 A directory contains the testcase if it contains at least one of these
12 files: Makefile.test, runtest.
14 * Testcase Definition:
16 - Makefile.test: testcase commands are in the form of makefile. The
17 test is run by "make -f Makefile.test".
19 - runtest: executable file that runs the test(s).
21 - rules: Specifies the rules this testcase applies to. The syntax of
22 this files is describes in section Rules description.
26 Each execution of testcase should produce the following outputs:
28 - Exit status of make or runtest:
29 0 - the testcase was successfully passed
31 2 - testcase cannot be executed (e.g. because the needed
32 compiler is not available)
36 In the case of error, the file 'error' should contain more
37 detailed description of the error.
39 - stdout and stderr: TODO
44 If the 'rules' file is contained in the testcase, this file defines
45 a set of Makefile.rules this testcase can be applied to. If there is
46 no rules file, this testcase is applied to all the rules.
48 The rules file contains one line of one of the following forms:
50 * <rules name> - This selects only one rules file
52 * all: - this selects all the rules files
54 * snip:<snippet name> - this selects all the rules, which contain the
57 * python:<python exression> - The python expression is evaluated. The
58 global namespace contains the following variables:
60 - rules: the name of tested rules
62 - snippets: is of type list and contains the snippet names from
63 which the tested rules are composed.
65 If the expression evaluates as True, the testcase is executed with
66 this rules, otherwise it is not.
68 Example: python: "config_h" in snippets and rules != "rtems"