CIME.tests.utils.CMakeTester
- class CIME.tests.utils.CMakeTester(parent, cmake_string)[source]
Bases:
object
Helper class for checking CMake output.
Public methods: __init__ query_var assert_variable_equals assert_variable_matches
Methods
__init__
Constructor for CMake test helper class.
Assert that a variable in the CMakeLists has a given value.
Assert that a variable in the CMkeLists matches a regex.
Request the value of a variable in Macros.cmake, as a string.
- assert_variable_equals(var_name, value, env=None, var=None)[source]
Assert that a variable in the CMakeLists has a given value.
Arguments: var_name - Name of variable to check. value - The string that the variable value should be equal to. env - Optional. Dict of environment variables to set when calling cmake. var - Optional. Dict of CMake variables to set when calling cmake.
- assert_variable_matches(var_name, regex, env=None, var=None)[source]
Assert that a variable in the CMkeLists matches a regex.
Arguments: var_name - Name of variable to check. regex - The regex to match. env - Optional. Dict of environment variables to set when calling cmake. var - Optional. Dict of CMake variables to set when calling cmake.
- query_var(var_name, env, var)[source]
Request the value of a variable in Macros.cmake, as a string.
Arguments: var_name - Name of the variable to query. env - A dict containing extra environment variables to set when calling
cmake.
var - A dict containing extra CMake variables to set when calling cmake.