oss-fuzz/infra/cifuzz
jonathanmetzman 1ece14aeb2
Abstract away duplicate code in prepare_for_fuzzer_build (#6706)
Share more code between the 4 implementations of `prepare_for_fuzzer_build`.

This simplifies the code of these implementations, reduces repetition and makes them easier to
understand.

Create helper functions/methods for:
1. Creating a failed `BuildPreparationResult`: `get_build_preparation_failure`
2. Building an external project docker image: `_build_external_project_docker_image` 
3. Cloning a repo and checking out the specified commit/pr: `_clone_repo_and_checkout`
4. Detecting the main repo `_detect_main_repo`
5. Creating a repo manager from an existing checkout: `_create_repo_manager_for_project_src_path`

Change `ExternalGeneric` implementation of `prepare_for_fuzzer_build` to:
1. Call `_create_repo_manager_for_project_src_path`
2. Call `_build_external_project_docker_image`

Change `InternalGeneric` implementation of `prepare_for_fuzzer_build` to:
1. Call `_detect_main_repo`
2. Call `_create_repo_manager_for_project_src_path`

Change `ExternalGithub` implementation of `prepare_for_fuzzer_build` to:
1. Call `_clone_repo_and_checkout`
2. Call `_build_external_project_docker_image`

Change `InternalGithub` implementation of `prepare_for_fuzzer_build` to:
1. Call `_detect_main_repo`
2. Call `_clone_repo_and_checkout`
2021-11-01 02:59:44 +00:00
..
actions [clusterfuzzlite] Fixes for gsutil (#6683) 2021-10-28 15:00:44 -04:00
cifuzz-base [clusterfuzzlite] Fixes for gsutil (#6683) 2021-10-28 15:00:44 -04:00
external-actions [clusterfuzzlite] Fixes for gsutil (#6683) 2021-10-28 15:00:44 -04:00
filestore Fix diffing on non-GitHub and improve config (#6707) 2021-10-31 20:36:07 -04:00
test_data [CIFuzz] Force external to use .clusterfuzzlite for build integrations. (#6167) 2021-08-04 16:13:51 -07:00
affected_fuzz_targets.py
affected_fuzz_targets_test.py [infra][tests][NFC] Change mocked function prefix from "mocked_" to "mock_" (#6198) 2021-08-12 11:25:57 -07:00
base_runner_utils.py [cifuzz] Fuzz in cifuzz-base (#6142) 2021-08-05 13:27:24 -07:00
build-images.sh [build-images.sh] Improve testing (#6709) 2021-10-31 09:54:39 -04:00
build_fuzzers.py Fix diffing on non-GitHub and improve config (#6707) 2021-10-31 20:36:07 -04:00
build_fuzzers_entrypoint.py Fix diffing on non-GitHub and improve config (#6707) 2021-10-31 20:36:07 -04:00
build_fuzzers_test.py Fix diffing on non-GitHub and improve config (#6707) 2021-10-31 20:36:07 -04:00
cifuzz_combined_entrypoint.py Fix diffing on non-GitHub and improve config (#6707) 2021-10-31 20:36:07 -04:00
cifuzz_end_to_end_test.py [ClusterFuzzLite] Support GCB and gsutil/gcs as filestore. (#6629) 2021-10-27 10:00:04 -04:00
cloudbuild.yaml [clusterfuzzlite] Don't use cifuzz term in image name (#6661) 2021-10-28 08:30:09 -04:00
clusterfuzz_deployment.py Fix diffing on non-GitHub and improve config (#6707) 2021-10-31 20:36:07 -04:00
clusterfuzz_deployment_test.py Fix diffing on non-GitHub and improve config (#6707) 2021-10-31 20:36:07 -04:00
config_utils.py Fix diffing on non-GitHub and improve config (#6707) 2021-10-31 20:36:07 -04:00
config_utils_test.py Fix diffing on non-GitHub and improve config (#6707) 2021-10-31 20:36:07 -04:00
continuous_integration.py Abstract away duplicate code in prepare_for_fuzzer_build (#6706) 2021-11-01 02:59:44 +00:00
continuous_integration_test.py [infra][tests][NFC] Change mocked function prefix from "mocked_" to "mock_" (#6198) 2021-08-12 11:25:57 -07:00
docker.py [cifuzz][prow] Support docker in docker to support prow. (#6556) 2021-10-05 09:01:38 -04:00
docker_test.py [infra][tests][NFC] Change mocked function prefix from "mocked_" to "mock_" (#6198) 2021-08-12 11:25:57 -07:00
environment.py
example_main.yml
filestore_utils.py [ClusterFuzzLite] Support GCB and gsutil/gcs as filestore. (#6629) 2021-10-27 10:00:04 -04:00
filestore_utils_test.py [CIFuzz] Force external to use .clusterfuzzlite for build integrations. (#6167) 2021-08-04 16:13:51 -07:00
fuzz_target.py cifuzz: Fix artifacts uploading issues. (#6646) 2021-10-27 12:24:26 +11:00
fuzz_target_test.py cifuzz: Fix artifacts uploading issues. (#6646) 2021-10-27 12:24:26 +11:00
generate_coverage_report.py [cifuzz] Add pruning task (#6188) 2021-08-10 11:10:10 -07:00
generate_coverage_report_test.py [infra][tests][NFC] Change mocked function prefix from "mocked_" to "mock_" (#6198) 2021-08-12 11:25:57 -07:00
get_coverage.py
get_coverage_test.py [infra][tests][NFC] Change mocked function prefix from "mocked_" to "mock_" (#6198) 2021-08-12 11:25:57 -07:00
http_utils.py
http_utils_test.py [infra][tests][NFC] Change mocked function prefix from "mocked_" to "mock_" (#6198) 2021-08-12 11:25:57 -07:00
logs.py cifuzz: set log level to info by default. (#6604) 2021-10-26 02:18:17 +00:00
package-lock.json [cifuzz] Use javascript actions library for uploading artifacts (#6552) 2021-10-05 09:16:54 -04:00
package.json [cifuzz] Use javascript actions library for uploading artifacts (#6552) 2021-10-05 09:16:54 -04:00
requirements.txt Update requirements.txt (#6574) 2021-10-11 09:55:39 -04:00
run_cifuzz.py [ClusterFuzzLite] Support GCB and gsutil/gcs as filestore. (#6629) 2021-10-27 10:00:04 -04:00
run_fuzzers.py [clusterfuzzlite] Fixes for gsutil (#6683) 2021-10-28 15:00:44 -04:00
run_fuzzers_entrypoint.py Fix diffing on non-GitHub and improve config (#6707) 2021-10-31 20:36:07 -04:00
run_fuzzers_test.py Fix diffing on non-GitHub and improve config (#6707) 2021-10-31 20:36:07 -04:00
stack_parser.py Use libClusterFuzz for CIFuzz fuzzing and pruning. (#6375) 2021-09-13 12:16:13 +10:00
stack_parser_test.py Use libClusterFuzz for CIFuzz fuzzing and pruning. (#6375) 2021-09-13 12:16:13 +10:00
test_helpers.py [cifuzz] Fuzz in cifuzz-base (#6142) 2021-08-05 13:27:24 -07:00
workspace_utils.py Don't upload builds in run_fuzzers. (#6151) 2021-08-17 06:36:06 +00:00