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