aboutsummaryrefslogtreecommitdiff
path: root/projects/linkerd2-proxy
diff options
context:
space:
mode:
authorDavidKorczynski <david@adalogics.com>2021-04-19 10:41:14 +0100
committerGitHub <noreply@github.com>2021-04-19 10:41:14 +0100
commit94157dc996cf57838ebec8bf0c483cc63f6ba3ab (patch)
tree84c32ae61ab8cce47abc350a3b11e160ac668bbc /projects/linkerd2-proxy
parent3f10d115fdbdcc2bcc7aa4b666df259458cdc54f (diff)
downloadoss-fuzz-94157dc996cf57838ebec8bf0c483cc63f6ba3ab.tar.gz
linkerd2-proxy: generalise build script (#5625)
* linkerd2-proxy generalise build script to arbitrary amount of fuzzers. * minor fix.
Diffstat (limited to 'projects/linkerd2-proxy')
-rwxr-xr-xprojects/linkerd2-proxy/build.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/projects/linkerd2-proxy/build.sh b/projects/linkerd2-proxy/build.sh
index 6d16e0154..228d7742f 100755
--- a/projects/linkerd2-proxy/build.sh
+++ b/projects/linkerd2-proxy/build.sh
@@ -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