]>
Commit | Line | Data |
---|---|---|
93374185 EV |
1 | #!/bin/bash |
2 | ||
3 | set -e | |
4 | set -x | |
fa8ac5eb EV |
5 | set -u |
6 | ||
7 | REPO_ROOT=${REPO_ROOT:-$(pwd)} | |
93374185 | 8 | |
8c6637ba EV |
9 | sudo apt-get update -y |
10 | sudo apt-get build-dep systemd -y | |
11 | sudo apt-get install -y ninja-build python3-pip python3-setuptools | |
12 | pip3 install meson | |
13 | ||
93374185 | 14 | cd $REPO_ROOT |
8c6637ba EV |
15 | tools/oss-fuzz.sh |
16 | timeout --preserve-status 5 ./out/fuzz-unit-file | |
17 | git clean -dxff | |
18 | ||
93374185 EV |
19 | wget https://app.fuzzbuzz.io/releases/cli/latest/linux/fuzzbuzz |
20 | chmod +x fuzzbuzz | |
21 | ./fuzzbuzz validate | |
22 | ./fuzzbuzz target test fuzz-unit-file --all | |
fcbabd0f EV |
23 | |
24 | git clone https://github.com/google/oss-fuzz /tmp/oss-fuzz | |
25 | cd /tmp/oss-fuzz | |
26 | sudo ./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 | |
30 | sudo script -e -c "./infra/helper.py build_fuzzers --clean --sanitizer=memory systemd $REPO_ROOT" | |
31 | sudo script -e -c "./infra/helper.py check_build --sanitizer=memory systemd" |