2018-12-23 15:31:14 +03:00
#!/bin/bash
set -e
set -x
2019-05-10 11:33:37 +03:00
PACKAGES = ( cryptsetup-bin
gettext
iptables-dev
iputils-ping
isc-dhcp-client
itstool
kbd
libblkid-dev
libcap-dev
libcurl4-gnutls-dev
libgpg-error-dev
liblz4-dev
liblzma-dev
libmicrohttpd-dev
libmount-dev
libmount-dev
libqrencode-dev
libxkbcommon-dev
linux-image-virtual
mount
net-tools
ninja-build
perl
python-lxml
python3-evdev
python3-lxml
python3-pip
python3-pyparsing
python3-setuptools
qemu-system-x86
strace
unifont
util-linux)
2019-05-12 04:45:29 +03:00
bash -c "echo 'deb-src http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse' >>/etc/apt/sources.list"
2019-05-10 11:33:37 +03:00
2018-12-23 15:31:14 +03:00
apt-get update
apt-get build-dep systemd -y
2019-05-10 11:33:37 +03:00
apt-get install -y " ${ PACKAGES [@] } "
2018-12-23 15:31:14 +03:00
pip3 install meson
2019-05-12 04:45:29 +03:00
cd ${ REPO_ROOT :- $( pwd ) }
2018-12-23 15:31:14 +03:00
2019-02-03 08:07:23 +03:00
sed -i 's/2\.30/2.27/' meson.build
2018-12-23 15:31:14 +03:00
meson --werror -Db_sanitize= address,undefined -Dsplit-usr= true build
ninja -v -C build
2019-05-14 14:04:42 +03:00
make -C test/TEST-01-BASIC clean setup run NSPAWN_TIMEOUT = 600 TEST_NO_QEMU = yes NSPAWN_ARGUMENTS = --keep-unit RUN_IN_UNPRIVILEGED_CONTAINER = no
2018-12-25 07:56:46 +03:00
# Now that we're more or less sure that ASan isn't going to crash systemd and cause a kernel panic
# let's also run the test with QEMU to cover udevd, sysctl and everything else that isn't run
# in containers.
2019-05-14 14:13:04 +03:00
# This should be turned on once `journalctl --flush` isn't flaky any more
#make -C test/TEST-01-BASIC clean setup run QEMU_TIMEOUT=900 TEST_NO_NSPAWN=yes