Structure of a Testcase
-----------------------
-A directory contains the testcase if it contains at least one of these
-files: Makefile.test, runtest.
+A directory contains the testcase if it contains at least one file
+that matches runtest* pattern.
* Testcase Definition:
- - Testcase program:
- either Makefile.test, where the commands are in the form of makefile.
- or runtest, which is the executable file that runs the test(s).
+ This is the description of special files in the testcase
+ directory. Besides these files, testcase directory contains all the
+ other files needed to run the testcase (e.g. sources, config.omk
+ etc.)
+
+ - runtest*: is the executable that runs the test(s). It is possible
+ to have more files in a testcase directory which begins with
+ runtest. In that case all these files will be executed in
+ alphabetical order as a separate testcases. The goal is to be able
+ to write several tests on the same structure of files and directories.
- rules: Specifies the rules this testcase applies to. The syntax of
this files is describes in section Rules description.
* Testcase Execution:
- If Makefile.test is found, make is executed as "make -k -f
- Makefile.test". If no Makefile.test is found, runtest is
- executed. Tests are executed with OMK_RULES environment variable set
- to the name of the actual rules tested.
+ Runtest is executed with OMK_RULES environment variable set to the
+ name of the actual rules tested and OMK_TESTSROOT to the directory
+ containing the runtests.py script.
* Testcase Output:
- Error message:
- In the case of error, the file 'error' should contain more
+ In the case of error, the file '_error' should contain more
detailed description of the error.
- stdout and stderr: TODO
* snip:<snippet name> - this selects all the rules, which contain the
given snippet.
-* python:<python exression> - The python expression is evaluated. The
+* python:<python expression> - The python expression is evaluated. The
global namespace contains the following variables:
- rules: the name of tested rules