]> git.ipfire.org Git - thirdparty/systemd.git/blame - travis-ci/managers/fuzzbuzz.sh
travis: make sure the fuzzers can be built in "local" mode
[thirdparty/systemd.git] / travis-ci / managers / fuzzbuzz.sh
CommitLineData
93374185
EV
1#!/bin/bash
2
3set -e
4set -x
fa8ac5eb
EV
5set -u
6
7REPO_ROOT=${REPO_ROOT:-$(pwd)}
93374185 8
8c6637ba
EV
9sudo apt-get update -y
10sudo apt-get build-dep systemd -y
11sudo apt-get install -y ninja-build python3-pip python3-setuptools
12pip3 install meson
13
93374185 14cd $REPO_ROOT
8c6637ba
EV
15tools/oss-fuzz.sh
16timeout --preserve-status 5 ./out/fuzz-unit-file
17git clean -dxff
18
93374185
EV
19wget https://app.fuzzbuzz.io/releases/cli/latest/linux/fuzzbuzz
20chmod +x fuzzbuzz
21./fuzzbuzz validate
22./fuzzbuzz target test fuzz-unit-file --all
fcbabd0f
EV
23
24git clone https://github.com/google/oss-fuzz /tmp/oss-fuzz
25cd /tmp/oss-fuzz
26sudo ./infra/helper.py pull_images
fa8ac5eb
EV
27
28# helper.py is wrapped in script to trick it into thinking it's "interactive"
29# See https://github.com/systemd/systemd/pull/12542#issuecomment-491563572
30sudo script -e -c "./infra/helper.py build_fuzzers --clean --sanitizer=memory systemd $REPO_ROOT"
31sudo script -e -c "./infra/helper.py check_build --sanitizer=memory systemd"