tmux: fix coverage (#6641)

This commit is contained in:
DavidKorczynski 2021-10-23 20:35:29 +01:00 committed by GitHub
parent 7b5b94721b
commit b837a1424d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 7 deletions

View File

@ -16,7 +16,11 @@
FROM gcr.io/oss-fuzz-base/base-builder
RUN apt-get update && apt-get install -y autoconf automake bison pkg-config \
libevent-dev ncurses-dev
ncurses-dev libtool
RUN git clone https://github.com/libevent/libevent.git && \
cd libevent && ./autogen.sh && ./configure --disable-openssl --disable-shared && \
make clean && make all && make install
RUN git clone --depth 1 https://github.com/tmux/tmux.git
RUN git clone --depth 1 https://github.com/tmux/tmux-fuzzing-corpus.git

View File

@ -15,12 +15,15 @@
#
################################################################################
# Ensure libevent can be found
export PKG_CONFIG_PATH="/usr/local/lib/"
./autogen.sh
./configure \
--enable-fuzzing \
FUZZING_LIBS="${LIB_FUZZING_ENGINE} -lc++" \
LIBEVENT_LIBS="-Wl,-Bstatic -levent -Wl,-Bdynamic" \
LIBTINFO_LIBS="-Wl,-Bstatic -ltinfo -Wl,-Bdynamic"
LIBTINFO_LIBS=" -l:libtinfo.a "
make -j"$(nproc)" check
find "${SRC}/tmux/fuzz/" -name '*-fuzzer' -exec cp -v '{}' "${OUT}"/ \;
@ -44,8 +47,3 @@ cat "${SRC}/tmux-fuzzing-corpus/iterm2"/* | \
split -a5 -db$MAXLEN - iterm2.
zip -q -j -r "${OUT}/input-fuzzer_seed_corpus.zip" \
"${WORK}/fuzzing_corpus/"
# Handle libevent not existing on runner.
mkdir $OUT/lib
cp /lib/x86_64-linux-gnu/libevent_core* $OUT/lib
patchelf --set-rpath '$ORIGIN/lib' $OUT/input-fuzzer