diff --git a/targets/nss/Dockerfile b/targets/nss/Dockerfile index f018e5392..4b5ff0c15 100644 --- a/targets/nss/Dockerfile +++ b/targets/nss/Dockerfile @@ -20,5 +20,6 @@ RUN apt-get install -y make autoconf automake libtool mercurial zlib1g-dev RUN hg clone https://hg.mozilla.org/projects/nspr nspr RUN hg clone https://hg.mozilla.org/projects/nss nss +RUN git clone https://github.com/mozilla/nss-fuzzing-corpus.git nss-corpus COPY build.sh fuzzers/* /src/ diff --git a/targets/nss/build.sh b/targets/nss/build.sh index 60e951c6a..23c2bac35 100755 --- a/targets/nss/build.sh +++ b/targets/nss/build.sh @@ -59,3 +59,10 @@ for fuzzer in $FUZZERS; do /work/nss/lib/libnspr4.a /work/nss/lib/libplc4.a /work/nss/lib/libplds4.a \ /work/nss/lib/prlog2.o -o /out/$fuzzer $FUZZER_LDFLAGS done + +# Archive and copy to /out seed corpus if the build succeeded. +zip /work/nss/all_nss_seed_corpus.zip /src/nss-corpus/*/* + +for fuzzer in $FUZZERS; do + cp /work/nss/all_nss_seed_corpus.zip /out/${fuzzer}_seed_corpus.zip +done