diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:19:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:20:02 +0000 |
commit | 58daab21cd043e1dc37024a7f99b396788372918 (patch) | |
tree | 96771e43bb69f7c1c2b0b4f7374cb74d7866d0cb /fluent-bit/lib/jansson-e23f558/test/ossfuzz/travisoss.sh | |
parent | Releasing debian version 1.43.2-1. (diff) | |
download | netdata-58daab21cd043e1dc37024a7f99b396788372918.tar.xz netdata-58daab21cd043e1dc37024a7f99b396788372918.zip |
Merging upstream version 1.44.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fluent-bit/lib/jansson-e23f558/test/ossfuzz/travisoss.sh')
-rwxr-xr-x | fluent-bit/lib/jansson-e23f558/test/ossfuzz/travisoss.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/fluent-bit/lib/jansson-e23f558/test/ossfuzz/travisoss.sh b/fluent-bit/lib/jansson-e23f558/test/ossfuzz/travisoss.sh new file mode 100755 index 000000000..ddcfa075a --- /dev/null +++ b/fluent-bit/lib/jansson-e23f558/test/ossfuzz/travisoss.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +set -ex + +PROJECT_NAME=jansson + +# Clone the oss-fuzz repository +git clone https://github.com/google/oss-fuzz.git /tmp/ossfuzz + +if [[ ! -d /tmp/ossfuzz/projects/${PROJECT_NAME} ]] +then + echo "Could not find the ${PROJECT_NAME} project in ossfuzz" + + # Exit with a success code while the jansson project is not expected to exist + # on oss-fuzz. + exit 0 +fi + +# Work out which repo to clone from, inside Docker +if [[ ${TRAVIS_PULL_REQUEST} != "false" ]] +then + # Pull-request branch + REPO=${TRAVIS_PULL_REQUEST_SLUG} + BRANCH=${TRAVIS_PULL_REQUEST_BRANCH} +else + # Push build. + REPO=${TRAVIS_REPO_SLUG} + BRANCH=${TRAVIS_BRANCH} +fi + +# Modify the oss-fuzz Dockerfile so that we're checking out the current branch on travis. +sed -i "s@https://github.com/akheron/jansson.git@-b ${BRANCH} https://github.com/${REPO}.git@" /tmp/ossfuzz/projects/${PROJECT_NAME}/Dockerfile + +# Try and build the fuzzers +pushd /tmp/ossfuzz +python infra/helper.py build_image --pull ${PROJECT_NAME} +python infra/helper.py build_fuzzers ${PROJECT_NAME} +popd |