947
edits
(→mozinfo, writemozinfo, and manifestparser: formatting) |
(→How they work together: more formatting) |
||
| Line 47: | Line 47: | ||
* ManifestParser contains the basic logic for parsing ordered | * ManifestParser contains the basic logic for parsing ordered | ||
and nested manifests as well as querying them based on their | |||
tags. ManifestParser is not specific to tests | |||
* TestManifest inherits from ManifestParser and is the integration | * TestManifest inherits from ManifestParser and is the integration | ||
layer for test harnesses. | |||
The tests are returned as a list of dicts, with some keys, such as the | The tests are returned as a list of dicts, with some keys, such as the | ||
| Line 64: | Line 64: | ||
* skip-if: mark the test as ``disabled`` if the condition given as the | * skip-if: mark the test as ``disabled`` if the condition given as the | ||
value of the key is true. The variables passed in are used with | |||
basic javascript-syntax boolean logic (e.g.):: | |||
skip-if = os == 'linux' || (toolkit == 'cocoa' && debug) | skip-if = os == 'linux' || (toolkit == 'cocoa' && debug) | ||
For this example, the variables ``os``, ``toolkit``, and ``debug`` | |||
should be passed into the ``active_tests`` method. | |||
* run-if: similar to skip-if, but mark the test as ``disabled`` if the | * run-if: similar to skip-if, but mark the test as ``disabled`` if the | ||
condition is not true. skip-if and run-if can be used together, but | |||
if either disables the test, the test is disabled. | |||
* fail-if: the ``expected`` value of tests returned from | * fail-if: the ``expected`` value of tests returned from | ||
``active_tests`` is ``pass`` unless specified otherwise in the .ini | |||
file. If the test for fail-if is true, however, the value of | |||
``expected`` will be ``fail``. | |||
It is up to the harness to treat the tests appropriately based on | It is up to the harness to treat the tests appropriately based on | ||
edits