diff options
author | 2021-12-24 20:52:35 +0000 | |
---|---|---|
committer | 2021-12-24 20:52:35 +0000 | |
commit | f64134b0b3c2b27a4283e55581d41d83d3c3a64f (patch) | |
tree | 02a03fae97e4ae356c19f16334669351f599c796 /projects/tink | |
parent | c98ac91554337d211fe6c2f29b5a38f88ebe935b (diff) |
tink: fix coverage (#7064)
Resolves an issue that happens because of symbolic links. Substitutes
the symbolic link with an actual folder.
Diffstat (limited to 'projects/tink')
-rw-r--r-- | projects/tink/Dockerfile | 10 | ||||
-rwxr-xr-x | projects/tink/build.sh | 10 |
2 files changed, 13 insertions, 7 deletions
diff --git a/projects/tink/Dockerfile b/projects/tink/Dockerfile index 12b859f3..3e8cf25a 100644 --- a/projects/tink/Dockerfile +++ b/projects/tink/Dockerfile @@ -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/ diff --git a/projects/tink/build.sh b/projects/tink/build.sh index e75c0f20..aa8bcc3b 100755 --- a/projects/tink/build.sh +++ b/projects/tink/build.sh @@ -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 |