bin/oss-fuzz-build.sh | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-)
New commits: commit eef42ef32b651a9fd47edd0d8fcb650a2a058831 Author: Jan-Marek Glogowski <[email protected]> AuthorDate: Mon Dec 27 21:37:37 2021 +0100 Commit: Jan-Marek Glogowski <[email protected]> CommitDate: Thu Dec 30 00:16:24 2021 +0100 oss-fuzz: add more verbose output to build script * dump git HEAD status on build start * dump "date -r" and "df -h $OUT $WORK" at various steps * run "make clean" before autogen.sh, if Makefile exists Change-Id: I22885f820e81fa46d02699fb5c2129ac5921c5dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127609 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <[email protected]> diff --git a/bin/oss-fuzz-build.sh b/bin/oss-fuzz-build.sh index d0f4564a930e..0b5e0c05e462 100755 --- a/bin/oss-fuzz-build.sh +++ b/bin/oss-fuzz-build.sh @@ -7,7 +7,17 @@ if [ -z "${OUT}" ] || [ -z "${SRC}" ] || [ -z "${WORK}" ]; then exit 1 fi -echo start at `date -u` +print_stamp() +{ + local do_df="$1"; shift + echo "[[" `date -u` "]]" "build -" "$@" + if [ "$do_df" != "0" ]; then + df -h $OUT $WORK + fi +} + +print_stamp 1 start +echo git: `git -C $SRC/libreoffice log -1 --pretty=reference` #shuffle CXXFLAGS -stdlib=libc++ arg into CXX as well because we use #the CXX as the linker and need to pass -stdlib=libc++ to build @@ -21,15 +31,20 @@ export LDFLAGS="$CFLAGS -Wl,--compress-debug-sections,zlib -lpthread" #build-time rsc tool leaks a titch export ASAN_OPTIONS="detect_leaks=0" -df -h $OUT $WORK - cd $WORK -$SRC/libreoffice/autogen.sh --with-distro=LibreOfficeOssFuzz --with-external-tar=$SRC +if [ -f Makefile ]; then + print_stamp 0 clean + make clean +fi -make clean +print_stamp 0 autogen.sh +$SRC/libreoffice/autogen.sh --with-distro=LibreOfficeOssFuzz --with-external-tar=$SRC +print_stamp 1 make make +print_stamp 1 prepare '$OUT' + pushd instdir/program head -c -14 services.rdb > templateservices.rdb tail -c +85 ./services/services.rdb >> templateservices.rdb @@ -52,15 +67,15 @@ EOF done popd -df -h $OUT $WORK - #starting corpuses for zip_file in $SRC/*_seed_corpus.zip; do cp $zip_file $OUT done + #fuzzing dictionaries cp $SRC/*.dict $OUT + #options files cp $SRC/libreoffice/vcl/workben/*.options $OUT -echo end at `date -u` +print_stamp 1 end
