]> rtime.felk.cvut.cz Git - omk.git/commitdiff
Specification of test cases updated.
authorMichal Sojka <wentasah@centrum.cz>
Thu, 30 Nov 2006 20:08:00 +0000 (20:08 +0000)
committerMichal Sojka <wentasah@centrum.cz>
Thu, 30 Nov 2006 20:08:00 +0000 (20:08 +0000)
darcs-hash:20061130200803-c6db6-e08ff7c5aabd7d0bf8c7f0aac449dc0a2039a12c.gz

tests/README.tests

index fddcf5a21a85a2f434768e58ca664773dfd5834c..d8f0a8e4fd206becd165077c90050871e012c0dc 100644 (file)
@@ -2,21 +2,21 @@ Description of Testcases for OMK
 ================================
 
 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.
@@ -25,29 +25,44 @@ files: Makefile.test, run_test.
 
   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"