diff options
author | Jonathan Metzman <metzman@chromium.org> | 2021-09-02 08:43:02 -0700 |
---|---|---|
committer | Jonathan Metzman <metzman@chromium.org> | 2021-09-02 08:45:09 -0700 |
commit | 316f788f62922f0bad43eb4a922b42700d949a4b (patch) | |
tree | 595c5688c543dc38769b2c67d775e60b0735edcb /infra/build | |
parent | ebae509b6a9f8c4f7ecb50ba5bf061449eac76d9 (diff) | |
download | oss-fuzz-316f788f62922f0bad43eb4a922b42700d949a4b.tar.gz |
Fix i386 build uploading.
Don't upload to x86_64 bucket.
Fixes: https://github.com/google/oss-fuzz/issues/6382
Diffstat (limited to 'infra/build')
-rw-r--r-- | infra/build/functions/build_lib.py | 11 | ||||
-rwxr-xr-x | infra/build/functions/build_project.py | 3 |
2 files changed, 8 insertions, 6 deletions
diff --git a/infra/build/functions/build_lib.py b/infra/build/functions/build_lib.py index ea28cb618..292ef682f 100644 --- a/infra/build/functions/build_lib.py +++ b/infra/build/functions/build_lib.py @@ -83,9 +83,9 @@ def get_targets_list_url(bucket, project, sanitizer): return url -def get_upload_bucket(engine, testing=False, architecture='x86_64'): - """Returns the upload bucket for |engine|. Returns the testing bucket if - |testing|.""" +def get_upload_bucket(engine, architecture, testing): + """Returns the upload bucket for |engine| and architecture. Returns the + testing bucket if |testing|.""" bucket = ENGINE_INFO[engine].upload_bucket if architecture != 'x86_64': bucket += '-' + architecture @@ -96,8 +96,9 @@ def get_upload_bucket(engine, testing=False, architecture='x86_64'): def _get_targets_list(project_name, testing): """Returns target list.""" - # libFuzzer ASan is the default configuration, get list of targets from it. - bucket = get_upload_bucket('libfuzzer', testing) + # libFuzzer ASan 'x86_84' is the default configuration, get list of targets + # from it. + bucket = get_upload_bucket('libfuzzer', 'x86_64', testing) url = get_targets_list_url(bucket, project_name, 'address') url = urlparse.urljoin(GCS_URL_BASENAME, url) diff --git a/infra/build/functions/build_project.py b/infra/build/functions/build_project.py index c21a3f381..bdc7985e1 100755 --- a/infra/build/functions/build_project.py +++ b/infra/build/functions/build_project.py @@ -375,7 +375,8 @@ def get_upload_steps(project, build, timestamp, base_images_project, testing): """Returns the steps for uploading the fuzzer build specified by |project| and |build|. Uses |timestamp| for naming the uploads. Uses |base_images_project| and |testing| for determining which image to use for the upload.""" - bucket = build_lib.get_upload_bucket(build.fuzzing_engine, testing) + bucket = build_lib.get_upload_bucket(build.fuzzing_engine, build.architecture, + testing) stamped_name = '-'.join([project.name, build.sanitizer, timestamp]) zip_file = stamped_name + '.zip' upload_url = build_lib.get_signed_url( |