From 47186fa36be5d594b4063b0c7df6ba2ce0eb46bd Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Fri, 27 Aug 2021 15:52:12 +1000 Subject: [PATCH] Fix libClusterFuzz env vars. (#2435) bot/env.yaml does not exist in libClusterFuzz. Just set the ones we need. --- src/clusterfuzz/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/clusterfuzz/__init__.py b/src/clusterfuzz/__init__.py index 36d5254a4e..7d9e7ada88 100644 --- a/src/clusterfuzz/__init__.py +++ b/src/clusterfuzz/__init__.py @@ -18,10 +18,12 @@ if not os.getenv('ROOT_DIR') and not os.getenv('GAE_ENV'): # If ROOT_DIR isn't set by the time we import this and we're not on GAE, # assume we're libClusterFuzz. + # Actual value does not matter, it just needs to be set. + os.environ['ROOT_DIR'] = '/tmp' + os.environ['LIB_CF'] = 'True' this_dir = os.path.dirname(os.path.abspath(__file__)) os.environ['CONFIG_DIR_OVERRIDE'] = os.path.join(this_dir, 'lib-config') - os.environ['ROOT_DIR'] = os.path.dirname(os.path.dirname(this_dir)) - os.environ['LIB_CF'] = 'True' - from ._internal.system import environment - environment.set_default_vars() + # Other necessary env vars. + os.environ['FAIL_RETRIES'] = '1' + os.environ['FAIL_WAIT'] = '10'