From 97d0732562d21ca4f8fd4f039cb9fc28c1d50d5f Mon Sep 17 00:00:00 2001 From: "Adi (Suissa) Peleg" Date: Tue, 7 Jun 2022 13:03:19 -0400 Subject: [PATCH] envoy: Limiting number of targets in CI (#7809) * envoy: Limiting number of targets in CI Signed-off-by: Adi Suissa-Peleg * Removing another target Signed-off-by: Adi Suissa-Peleg --- projects/envoy/build.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/projects/envoy/build.sh b/projects/envoy/build.sh index 051bfbada..e70292468 100755 --- a/projects/envoy/build.sh +++ b/projects/envoy/build.sh @@ -19,7 +19,15 @@ declare -r FUZZ_TARGET_QUERY=' let all_fuzz_tests = attr(tags, "fuzz_target", "...") in $all_fuzz_tests - attr(tags, "no_fuzz", $all_fuzz_tests) ' -declare -r OSS_FUZZ_TARGETS="$(bazel query "${FUZZ_TARGET_QUERY}" | sed 's/$/_oss_fuzz/')" + +if [ -n "${OSS_FUZZ_CI-}" ] +then + # CI has fewer resources so restricting to a small number of fuzz targets. + # Choosing the header_parser, and header_map_impl. + declare -r OSS_FUZZ_TARGETS="$(bazel query "${FUZZ_TARGET_QUERY}" | grep ':header' | sed 's/$/_oss_fuzz/')" +else + declare -r OSS_FUZZ_TARGETS="$(bazel query "${FUZZ_TARGET_QUERY}" | sed 's/$/_oss_fuzz/')" +fi declare -r EXTRA_BAZEL_FLAGS="$( if [ -n "$CC" ]; then