CIME.tests.utils.MakefileTester
- class CIME.tests.utils.MakefileTester(parent, make_string)[source]
Bases:
object
Helper class for checking Makefile output.
Public methods: __init__ query_var assert_variable_equals assert_variable_matches
Methods
__init__
Constructor for Makefile test helper class.
Assert that a variable in the Makefile has a given value.
Assert that a variable in the Makefile matches a regex.
Request the value of a variable in the Makefile, as a string.
- assert_variable_equals(var_name, value, env=None, var=None)[source]
Assert that a variable in the Makefile 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 make. var - Optional. Dict of make variables to set when calling make.
- assert_variable_matches(var_name, regex, env=None, var=None)[source]
Assert that a variable in the Makefile 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 make. var - Optional. Dict of make variables to set when calling make.
- query_var(var_name, env, var)[source]
Request the value of a variable in the Makefile, as a string.
Arguments: var_name - Name of the variable to query. env - A dict containing extra environment variables to set when calling
make.
- var - A dict containing extra make variables to set when calling make.
- (The distinction between env and var actually matters only for
CMake, though.)