]> git.ipfire.org Git - thirdparty/systemd.git/blob - travis-ci/managers/fuzzbuzz.sh
tests: make docker-run and helper.py happy by not using colons in filenames
[thirdparty/systemd.git] / travis-ci / managers / fuzzbuzz.sh
1 #!/bin/bash
2
3 set -e
4 set -x
5 set -u
6
7 REPO_ROOT=${REPO_ROOT:-$(pwd)}
8
9 cd $REPO_ROOT
10 wget https://app.fuzzbuzz.io/releases/cli/latest/linux/fuzzbuzz
11 chmod +x fuzzbuzz
12 ./fuzzbuzz validate
13 ./fuzzbuzz target test fuzz-unit-file --all
14
15 git clone https://github.com/google/oss-fuzz /tmp/oss-fuzz
16 cd /tmp/oss-fuzz
17 sudo ./infra/helper.py pull_images
18
19 # docker doesn't like colons in filenames so let's create a directory
20 # whose name can be consumed by the -v option.
21 # https://github.com/google/oss-fuzz/issues/2428
22 t=$(mktemp -d)
23 sudo mount --bind "$REPO_ROOT" "$t"
24
25 # helper.py is wrapped in script to trick it into thinking it's "interactive"
26 # See https://github.com/systemd/systemd/pull/12542#issuecomment-491563572
27 sudo script -e -c "./infra/helper.py build_fuzzers --clean --sanitizer=memory systemd $t"
28 sudo script -e -c "./infra/helper.py check_build --sanitizer=memory systemd"