From 033a858be0aa2fb95d258ea1ccb2a2b162ea0b48 Mon Sep 17 00:00:00 2001 From: jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com> Date: Fri, 7 May 2021 07:46:11 -0700 Subject: [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. --- infra/helper.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'infra/helper.py') 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 -- cgit v1.2.3