aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Evgeny Vereshchagin <evvers@ya.ru>2020-07-30 17:54:59 +0300
committerGravatar GitHub <noreply@github.com>2020-07-30 07:54:59 -0700
commit79b4afb9905bb2fa62a7fd0d26f87fa15cbe97f7 (patch)
tree62794da1f0c9bcc6e42a1af1e711c93acd8efa2f
parent61d1b47fe1eb6fb0c1879423cabd7de742d310fd (diff)
[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.
-rwxr-xr-xprojects/util-linux/build.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/projects/util-linux/build.sh b/projects/util-linux/build.sh
index b52536a6..203376e1 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