ENVIRONMENT_MODIFICATION.rst 1.7 KB

123456789101112131415161718192021222324252627282930313233
  1. ENVIRONMENT_MODIFICATION
  2. ------------------------
  3. Specify environment variables that should be modified for running a test. Note
  4. that the operations performed by this property are performed after the
  5. :prop_test:`ENVIRONMENT` property is already applied.
  6. If set to a list of environment variables and values of the form
  7. ``MYVAR=OP:VALUE``. Entries are considered in the order specified in the
  8. property's value. The ``OP`` may be one of:
  9. - ``reset``: Reset to the unmodified value, ignoring all modifications to
  10. ``MYVAR`` prior to this entry. Note that this will reset the variable to
  11. the value set by :prop_test:`ENVIRONMENT`, if it was set, and otherwise
  12. to its state from the rest of the CTest execution.
  13. - ``set``: Replaces the current value of ``MYVAR`` with ``VALUE``.
  14. - ``unset``: Unsets the current value of ``MYVAR``.
  15. - ``string_append``: Appends ``VALUE`` to the current value of ``MYVAR``.
  16. - ``string_prepend``: Prepends ``VALUE`` to the current value of ``MYVAR``.
  17. - ``path_list_append``: Appends ``VALUE`` to the current value of ``MYVAR``
  18. using the platform-specific list separator.
  19. - ``path_list_prepend``: Prepends ``VALUE`` to the current value of
  20. ``MYVAR`` using the platform-specific list separator.
  21. - ``cmake_list_append``: Appends ``VALUE`` to the current value of ``MYVAR``
  22. using ``;`` as the separator.
  23. - ``cmake_list_prepend``: Prepends ``VALUE`` to the current value of
  24. ``MYVAR`` using ``;`` as the separator.
  25. Unrecognized ``OP`` values will result in the test failing before it is
  26. executed. This is so that future operations may be added without changing
  27. valid behavior of existing tests.
  28. The environment changes from this property do not affect other tests.