Projects/ManifestDestiny/Integration: Difference between revisions

Jump to navigation Jump to search
(→‎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
and nested manifests as well as querying them based on their
  tags. ManifestParser is not specific to tests
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.
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
value of the key is true.  The variables passed in are used with
  basic javascript-syntax boolean logic (e.g.)::
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``
For this example, the variables ``os``, ``toolkit``, and ``debug``
  should be passed into the ``active_tests`` method.
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
condition is not true. skip-if and run-if can be used together, but
  if either disables the test, the test is disabled.
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
``active_tests`` is ``pass`` unless specified otherwise in the .ini
  file. If the test for fail-if is true, however, the value of
file. If the test for fail-if is true, however, the value of
  ``expected`` will be ``fail``.
``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
947

edits

Navigation menu