From 79b4afb9905bb2fa62a7fd0d26f87fa15cbe97f7 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Thu, 30 Jul 2020 17:54:59 +0300 Subject: [PATCH] [util-linux] run tools/oss-fuzz.sh if it exists (#4227) to make it easier to use CIFuzz to make sure https://github.com/karelzak/util-linux/pull/1068 is more or less in good shape. --- projects/util-linux/build.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/projects/util-linux/build.sh b/projects/util-linux/build.sh index b52536a6b..203376e1b 100755 --- a/projects/util-linux/build.sh +++ b/projects/util-linux/build.sh @@ -17,8 +17,12 @@ set -x -./autogen.sh -./configure --disable-all-programs --enable-libmount --enable-libblkid -make -j$(nproc) V=1 libmount.la libblkid.la -$CC $CFLAGS -Wall -Wextra -include config.h -I./include -I./libblkid/src -I./libmount/src -c $SRC/test_mount_fuzz.c -o test_mount_fuzz.o -$CXX $CXXFLAGS $LIB_FUZZING_ENGINE test_mount_fuzz.o ./.libs/libblkid.a ./.libs/libmount.a .libs/libblkid.a -o $OUT/test_mount_fuzz +if [[ -f "tools/oss-fuzz.sh" ]]; then + ./tools/oss-fuzz.sh +else + ./autogen.sh + ./configure --disable-all-programs --enable-libmount --enable-libblkid + make -j$(nproc) V=1 libmount.la libblkid.la + $CC $CFLAGS -Wall -Wextra -include config.h -I./include -I./libblkid/src -I./libmount/src -c $SRC/test_mount_fuzz.c -o test_mount_fuzz.o + $CXX $CXXFLAGS $LIB_FUZZING_ENGINE test_mount_fuzz.o ./.libs/libblkid.a ./.libs/libmount.a .libs/libblkid.a -o $OUT/test_mount_fuzz +fi