MCPcopy
hub / github.com/google/clusterfuzz / set_value

Function set_value

src/clusterfuzz/_internal/system/environment.py:1072–1085  ·  view source on GitHub ↗

Set an environment variable.

(environment_variable, value, env=None)

Source from the content-addressed store, hash-verified

1070
1071
1072def set_value(environment_variable, value, env=None):
1073 """Set an environment variable."""
1074 if env is None:
1075 env = os.environ
1076 value_str = str(value)
1077 environment_variable_str = str(environment_variable)
1078 value_str = value_str.replace('%ROOT_DIR%', os.getenv('ROOT_DIR', ''))
1079 env[environment_variable_str] = value_str
1080
1081 if is_trusted_host():
1082 from clusterfuzz._internal.bot.untrusted_runner import \
1083 environment as untrusted_env
1084 untrusted_env.forward_environment_variable(environment_variable_str,
1085 value_str)
1086
1087
1088def get_initial_task_name():

Callers 7

get_asan_optionsFunction · 0.70
set_memory_tool_optionsFunction · 0.70
set_local_log_onlyFunction · 0.70
set_task_id_varsFunction · 0.70

Calls 1

is_trusted_hostFunction · 0.85

Tested by

no test coverage detected