mirror of https://github.com/google/oss-fuzz.git
tink: fix coverage (#7064)
Resolves an issue that happens because of symbolic links. Substitutes the symbolic link with an actual folder.
This commit is contained in:
parent
c98ac91554
commit
f64134b0b3
|
@ -18,8 +18,10 @@ FROM gcr.io/oss-fuzz-base/base-builder
|
|||
FROM gcr.io/oss-fuzz-base/base-builder-go
|
||||
RUN apt-get update && apt-get install -y make pkg-config
|
||||
RUN git clone --depth 1 https://github.com/google/tink
|
||||
|
||||
RUN mkdir $SRC/tink/cc/fuzzing
|
||||
COPY fuzzing_CMake $SRC/tink/cc/fuzzing/CMakeLists.txt
|
||||
COPY tink_encrypt_decrypt_fuzzer.cc $SRC/tink/cc/fuzzing/tink_encrypt_decrypt_fuzzer.cc
|
||||
COPY build.sh $SRC/
|
||||
|
||||
WORKDIR tink
|
||||
COPY fuzzing_CMake \
|
||||
build.sh \
|
||||
tink_encrypt_decrypt_fuzzer.cc \
|
||||
$SRC/
|
||||
|
|
|
@ -15,9 +15,13 @@
|
|||
#
|
||||
################################################################################
|
||||
|
||||
mkdir ./cc/fuzzing
|
||||
cp $SRC/tink_encrypt_decrypt_fuzzer.cc ./cc/fuzzing/
|
||||
cp $SRC/fuzzing_CMake ./cc/fuzzing/CMakeLists.txt
|
||||
cd cc/fuzzing && cmake .
|
||||
make -j$(nproc)
|
||||
mv tink_encrypt_fuzzer $OUT/
|
||||
|
||||
# Hack to get coverage to work. We need this due to /src/tink/cc/fuzzing/tink/__include_alias/tink
|
||||
# being an symbolic link. Instead, we exchange it with the actual contents.
|
||||
rm /src/tink/cc/fuzzing/tink/__include_alias/tink
|
||||
mkdir /src/tinktmp
|
||||
cp -rf /src/tink/cc/ /src/tinktmp/tink
|
||||
cp -rf /src/tinktmp/tink/ /src/tink/cc/fuzzing/tink/__include_alias/tink
|
||||
|
|
Loading…
Reference in New Issue