linkerd2-proxy: generalise build script (#5625)

* linkerd2-proxy generalise build script to arbitrary amount of fuzzers.

* minor fix.
This commit is contained in:
DavidKorczynski 2021-04-19 10:41:14 +01:00 committed by GitHub
parent 3f10d115fd
commit 94157dc996
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -14,10 +14,18 @@
# limitations under the License.
#
################################################################################
TARGET_PATH="./fuzz/target/x86_64-unknown-linux-gnu/release"
BASE="$SRC/linkerd2-proxy/linkerd"
BUILD_FUZZER="cargo +nightly fuzz build --features fuzzing"
# Only compile inbound if there is no coverage
if [ $SANITIZER != "coverage" ]; then
cd ${BASE}/app/inbound
RUSTFLAGS="--cap-lints warn" ${BUILD_FUZZER}
cp ${TARGET_PATH}/fuzz_target_1 $OUT/fuzz_inbound
fi
cd ${BASE}/addr/
${BUILD_FUZZER}
cp ${TARGET_PATH}/fuzz_target_1 $OUT/fuzz_addr
@ -37,4 +45,6 @@ cp ${TARGET_PATH}/fuzz_target_1 $OUT/fuzz_tls
cd ${BASE}/transport-header
${BUILD_FUZZER}
cp ${TARGET_PATH}/fuzz_target_raw $OUT/fuzz_transport_raw
cp ${TARGET_PATH}/fuzz_target_structured $OUT/fuzz_transport_structured
if [ $SANITIZER != "coverage" ]; then
cp ${TARGET_PATH}/fuzz_target_structured $OUT/fuzz_transport_structured
fi