mirror of https://github.com/google/oss-fuzz.git
Use bazel generic script for opencensus (#5700)
This commit is contained in:
parent
98f5a82bdb
commit
a9fc96e56d
|
@ -19,18 +19,4 @@ git grep cc_fuzz_target.bzl | grep BUILD | cut -d: -f1 | uniq | while read i; do
|
|||
|
||||
git grep fuzz_target\( | grep BUILD | cut -d: -f1 | uniq | while read i; do sed -i -e 's/fuzz_target/fuzz_test/' $i; done
|
||||
|
||||
declare -r QUERY='
|
||||
let all_fuzz_tests = attr(tags, "fuzz-test", "//...") in
|
||||
$all_fuzz_tests - attr(tags, "no-oss-fuzz", $all_fuzz_tests)
|
||||
'
|
||||
|
||||
declare -r PACKAGE_SUFFIX="_oss_fuzz"
|
||||
declare -r OSS_FUZZ_TESTS="$(bazel query "${QUERY}" | sed "s/$/${PACKAGE_SUFFIX}/")"
|
||||
|
||||
bazel build -c opt --config=oss-fuzz --linkopt=-lc++ \
|
||||
--action_env=CC="${CC}" --action_env=CXX="${CXX}" \
|
||||
${OSS_FUZZ_TESTS[*]}
|
||||
|
||||
for oss_fuzz_archive in $(find bazel-bin/ -name "*${PACKAGE_SUFFIX}.tar"); do
|
||||
tar -xvf "${oss_fuzz_archive}" -C "${OUT}"
|
||||
done
|
||||
bazel_build_fuzz_tests
|
||||
|
|
Loading…
Reference in New Issue