diff options
Diffstat (limited to 'infra/build_specified_commit.py')
-rw-r--r-- | infra/build_specified_commit.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/infra/build_specified_commit.py b/infra/build_specified_commit.py index b2130ea85..d7b667004 100644 --- a/infra/build_specified_commit.py +++ b/infra/build_specified_commit.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Module to build a image from a specific commit, branch or pull request +"""Module to build a image from a specific commit, branch or pull request. This module is allows each of the OSS Fuzz projects fuzzers to be built from a specific point in time. This feature can be used for implementations @@ -147,7 +147,7 @@ def copy_src_from_docker(project_name, host_dir): @retry.wrap(_IMAGE_BUILD_TRIES, 2) def _build_image_with_retries(project_name): """Build image with retries.""" - return helper.build_image_impl(project_name) + return helper.build_image_impl(helper.Project(project_name)) def get_required_post_checkout_steps(dockerfile_path): @@ -223,15 +223,16 @@ def build_fuzzers_from_commit(commit, post_checkout_step, ]) - result = helper.build_fuzzers_impl(project_name=build_data.project_name, + project = helper.Project(build_data.project_name) + result = helper.build_fuzzers_impl(project=project, clean=True, engine=build_data.engine, sanitizer=build_data.sanitizer, architecture=build_data.architecture, env_to_add=None, source_path=host_src_path, - mount_location='/src') - if result == 0 or i == num_retry: + mount_path='/src') + if result or i == num_retry: break # Retry with an OSS-Fuzz builder container that's closer to the project @@ -285,7 +286,7 @@ def build_fuzzers_from_commit(commit, cleanup() cleanup() - return result == 0 + return result def detect_main_repo(project_name, repo_name=None, commit=None): @@ -297,10 +298,9 @@ def detect_main_repo(project_name, repo_name=None, commit=None): project_name: The name of the oss-fuzz project. repo_name: The name of the main repo in an OSS-Fuzz project. commit: A commit SHA that is associated with the main repo. - src_dir: The location of the projects source on the docker image. Returns: - The repo's origin, the repo's path. + A tuple containing (the repo's origin, the repo's path). """ if not repo_name and not commit: |