================================
Each test resides in a separate directory. The directories can be
-nested. There is no difference between the tests in diffrent levels of
+nested. There is no difference between the tests in different levels of
directory structure.
Structure of a Testcase
-----------------------
-A directory contain the testcase if it contains at least one of these
-files: Makefile.test, run_test.
+A directory contains the testcase if it contains at least one of these
+files: Makefile.test, runtest.
* Testcase Definition:
- - Makefile.test: testcase commands in the form of makefile. The test
- is run by "make -f Makefile.test".
+ - Makefile.test: testcase commands are in the form of makefile. The
+ test is run by "make -f Makefile.test".
- - run_test: executable file that runs the test(s).
+ - runtest: executable file that runs the test(s).
- rules: Specifies the rules this testcase applies to. The syntax of
this files is describes in section Rules description.
Each execution of testcase should produce the following outputs:
- - Exit status of make or run_test:
- 0 - the testcase is considered as passed
+ - Exit status of make or runtest:
+ 0 - the testcase was successfully passed
1 - testcase failed
2 - testcase cannot be executed (e.g. because the needed
compiler is not available)
- - Besides exit status, the testcases can produce the following
- output.
- * FIXME: chybove hlaseni - soubor error nebo stderr?
+ - Error message:
+ In the case of error, the file 'error' should contain more
+ detailed description of the error.
+
+ - stdout and stderr: TODO
Rules Description
-----------------
-The rules file contains one or more lines. Each line represents a set
-of zero or more rules. The set of rules to be applied to this testcase
-is union of these sets.
+If the 'rules' file is contained in the testcase, this file defines
+a set of Makefile.rules this testcase can be applied to. If there is
+no rules file, this testcase is applied to all the rules.
+
+The rules file contains one line of one of the following forms:
+
+* <rules name> - This selects only one rules file
+
+* all: - this selects all the rules files
+
+* snip:<snippet name> - this selects all the rules, which contain the
+ given snippet.
+
+* python:<python exression> - The python expression is evaluated. The
+ global namespace contains the following variables:
-Each line can contain:
+ - rules: the name of tested rules
-* <rule name> - This selects rules of this name
+ - snippets: is of type list and contains the snippet names from
+ which the tested rules are composed.
-* all: - this selects all rules
+ If the expression evaluates as True, the testcase is executed with
+ this rules, otherwise it is not.
-* snip:<snippet name> - this selects all the rules, which are composed
- of the given snippet.
+ Example: python: "config_h" in snippets and rules != "rtems"