From 283b79ff850f45b294725ce28992d537d3abd1fb Mon Sep 17 00:00:00 2001 From: "A. David" <7168263+aureliendavid@users.noreply.github.com> Date: Fri, 23 Feb 2024 15:57:34 +0100 Subject: [PATCH] [gpac] small script changes to facilitate local debug (#11633) * use testsuite as submodule * update workdir to work with local source mounts --- projects/gpac/Dockerfile | 4 ++-- projects/gpac/build.sh | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/projects/gpac/Dockerfile b/projects/gpac/Dockerfile index 0784e48ad..26939ca33 100755 --- a/projects/gpac/Dockerfile +++ b/projects/gpac/Dockerfile @@ -16,7 +16,7 @@ FROM gcr.io/oss-fuzz-base/base-builder RUN apt-get update && apt-get install -y build-essential pkg-config libz-dev -RUN git clone https://github.com/gpac/gpac && git clone https://github.com/gpac/testsuite +RUN git clone https://github.com/gpac/gpac && cd gpac && git submodule update --init --remote --recursive -WORKDIR $SRC COPY build.sh $SRC/ +WORKDIR $SRC/gpac \ No newline at end of file diff --git a/projects/gpac/build.sh b/projects/gpac/build.sh index 567538d21..b8c222b8a 100755 --- a/projects/gpac/build.sh +++ b/projects/gpac/build.sh @@ -15,12 +15,11 @@ # ################################################################################ -cd gpac ./configure --static-build --extra-cflags="${CFLAGS}" --extra-ldflags="${CFLAGS}" make -fuzzers=$(find $SRC/testsuite/oss-fuzzers -name "fuzz_*.c") +fuzzers=$(find $SRC/gpac/testsuite/oss-fuzzers -name "fuzz_*.c") for f in $fuzzers; do fuzzerName=$(basename $f .c) @@ -32,8 +31,8 @@ for f in $fuzzers; do -lm -lz -lpthread -lssl -lcrypto -DGPAC_HAVE_CONFIG_H - if [ -d "$SRC/testsuite/oss-fuzzers/${fuzzerName}_corpus" ]; then - zip -j $OUT/${fuzzerName}_seed_corpus.zip $SRC/testsuite/oss-fuzzers/${fuzzerName}_corpus/* + if [ -d "$SRC/gpac/testsuite/oss-fuzzers/${fuzzerName}_corpus" ]; then + zip -j $OUT/${fuzzerName}_seed_corpus.zip $SRC/gpac/testsuite/oss-fuzzers/${fuzzerName}_corpus/* fi done \ No newline at end of file