Skip to content
Snippets Groups Projects
Commit f9465db8 authored by Egor Ivkov's avatar Egor Ivkov Committed by Dmitry Ivanov
Browse files

test/fuzz: generate fuzzing coverage report in ci

NO_DOC=internal
NO_TEST=internal
NO_CHANGELOG=internal
parent bb7e0f94
No related branches found
No related tags found
No related merge requests found
......@@ -72,6 +72,7 @@ coverage:
- export PATH="$PATH:$PWD" # for GLAuth (CMake will download it)
- make -f .test.mk test-coverage
# TODO: move out shared setup for fuzzing jobs
# Check that fuzzing works
fuzz-check-build:
extends: .test
......@@ -84,10 +85,35 @@ fuzz-check-build:
# Checkout a fixed oss-fuzz commit to guarantee reproducible builds
- git fetch --depth=1 origin e8e124996508f1e4ffe566896638c7213ab440d5
- git checkout e8e124996508f1e4ffe566896638c7213ab440d5
- python3 infra/helper.py build_image --no-pull --external ..
- python3 infra/helper.py build_fuzzers --external .. --sanitizer=address
- python3 infra/helper.py check_build --external .. --sanitizer=address
# Generate coverage report
fuzz-coverage:
extends: .test
tags: [shell_p_t]
when: manual
script:
# Clone oss-fuzz instead of adding it as a submodule
# as we don't want it to be checked by static analyzers - it's used only for fuzzing
- git clone --depth=1 https://github.com/google/oss-fuzz.git
- cd oss-fuzz
# Checkout a fixed oss-fuzz commit to guarantee reproducible builds
- git fetch --depth=1 origin e8e124996508f1e4ffe566896638c7213ab440d5
- git checkout e8e124996508f1e4ffe566896638c7213ab440d5
- python3 infra/helper.py build_fuzzers --external .. --sanitizer=coverage
# `coverage` command requires corpus folders to be located in
# `oss-fuzz/build/corpus/{project_name}`
# TODO: find out why they are not located there by default
- mkdir -p build/corpus/tarantool
- cp -r ../test/static/corpus/* build/corpus/tarantool
# add `_fuzzer` postfix to corpus folders
- (cd build/corpus/tarantool && for i in *; do mv "$i" "${i%.}_fuzzer"; done)
- python3 infra/helper.py coverage --no-serve --external ..
artifacts:
paths:
- oss-fuzz/build/out/tarantool/report
# Run fuzzers until they satisfy stop criterias
# XXX: Just a stub for now, it probably needs a custom runner
# and support for running several fuzzers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment