aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xinfra/helper.py8
-rw-r--r--infra/utils.py4
-rw-r--r--infra/utils_test.py2
3 files changed, 7 insertions, 7 deletions
diff --git a/infra/helper.py b/infra/helper.py
index 24427a94..bf315829 100755
--- a/infra/helper.py
+++ b/infra/helper.py
@@ -30,8 +30,8 @@ import subprocess
import sys
import templates
-OSSFUZZ_DIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
-BUILD_DIR = os.path.join(OSSFUZZ_DIR, 'build')
+OSS_FUZZ_DIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+BUILD_DIR = os.path.join(OSS_FUZZ_DIR, 'build')
BASE_IMAGES = [
'gcr.io/oss-fuzz-base/base-image',
@@ -59,7 +59,7 @@ CORPUS_BACKUP_URL_FORMAT = (
def main(): # pylint: disable=too-many-branches,too-many-return-statements,too-many-statements
"""Get subcommand from program arguments and do it."""
- os.chdir(OSSFUZZ_DIR)
+ os.chdir(OSS_FUZZ_DIR)
if not os.path.exists(BUILD_DIR):
os.mkdir(BUILD_DIR)
@@ -260,7 +260,7 @@ def _get_command_string(command):
def _get_project_dir(project_name):
"""Returns path to the project."""
- return os.path.join(OSSFUZZ_DIR, 'projects', project_name)
+ return os.path.join(OSS_FUZZ_DIR, 'projects', project_name)
def get_dockerfile_path(project_name):
diff --git a/infra/utils.py b/infra/utils.py
index 468438f4..3d9a620a 100644
--- a/infra/utils.py
+++ b/infra/utils.py
@@ -29,8 +29,8 @@ VALID_TARGET_NAME = re.compile(r'^[a-zA-Z0-9_-]+$')
def chdir_to_root():
"""Changes cwd to OSS-Fuzz root directory."""
# Change to oss-fuzz main directory so helper.py runs correctly.
- if os.getcwd() != helper.OSSFUZZ_DIR:
- os.chdir(helper.OSSFUZZ_DIR)
+ if os.getcwd() != helper.OSS_FUZZ_DIR:
+ os.chdir(helper.OSS_FUZZ_DIR)
def execute(command, location=None, check_result=False):
diff --git a/infra/utils_test.py b/infra/utils_test.py
index a25dc4fb..432a9827 100644
--- a/infra/utils_test.py
+++ b/infra/utils_test.py
@@ -59,7 +59,7 @@ class GetFuzzTargetsUnitTest(unittest.TestCase):
self.assertCountEqual(fuzz_targets,
[crash_fuzzer_path, nocrash_fuzzer_path])
fuzz_targets = utils.get_fuzz_targets(
- os.path.join(helper.OSSFUZZ_DIR, 'infra'))
+ os.path.join(helper.OSS_FUZZ_DIR, 'infra'))
self.assertFalse(fuzz_targets)
def test_invalid_filepath(self):