aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/helper.py
diff options
context:
space:
mode:
authorGravatar jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>2021-05-07 07:46:11 -0700
committerGravatar GitHub <noreply@github.com>2021-05-07 07:46:11 -0700
commit033a858be0aa2fb95d258ea1ccb2a2b162ea0b48 (patch)
treea5a4ef12682e21044ebd6677ee65fd17f809c013 /infra/helper.py
parentf1cb7564521e6c0f03ef687a5e46798349ea3e4a (diff)
[infra] Set OSS_FUZZ_CI=1 in CI so build scripts can know (#5731)
This will help bitcoin use CI to verify the build works, because the last step is trivial (so testing not really needed) but will fill up the disk.
Diffstat (limited to 'infra/helper.py')
-rwxr-xr-xinfra/helper.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/infra/helper.py b/infra/helper.py
index 0123ee3f..812e2d1c 100755
--- a/infra/helper.py
+++ b/infra/helper.py
@@ -554,6 +554,8 @@ def build_fuzzers_impl( # pylint: disable=too-many-arguments,too-many-locals,to
'ARCHITECTURE=' + architecture,
]
+ _add_oss_fuzz_ci_if_needed(env)
+
if project_language:
env.append('FUZZING_LANGUAGE=' + project_language)
@@ -621,6 +623,13 @@ def build_fuzzers(args):
args.source_path)
+def _add_oss_fuzz_ci_if_needed(env):
+ """Adds value of |OSS_FUZZ_CI| environment variable to |env| if it is set."""
+ oss_fuzz_ci = os.getenv('OSS_FUZZ_CI')
+ if oss_fuzz_ci:
+ env.append('OSS_FUZZ_CI=' + oss_fuzz_ci)
+
+
def check_build(args):
"""Checks that fuzzers in the container execute without errors."""
if not check_project_exists(args.project_name):
@@ -641,6 +650,7 @@ def check_build(args):
'ARCHITECTURE=' + args.architecture,
'FUZZING_LANGUAGE=' + fuzzing_language,
]
+ _add_oss_fuzz_ci_if_needed(env)
if args.e:
env += args.e