summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2021-12-27 21:37:37 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2021-12-30 00:16:24 +0100
commiteef42ef32b651a9fd47edd0d8fcb650a2a058831 (patch)
treea0d34df4f036eb730ac345b8cf7408d6437ddff1 /bin
parent6979fec4c1d0d0c4c99bbf58aa4fd7d0f2be42f4 (diff)
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 <glogow@fbihome.de>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/oss-fuzz-build.sh31
1 files changed, 23 insertions, 8 deletions
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