diff --git a/test.sh b/test.sh new file mode 100755 index 0000000000..c77e60599a --- /dev/null +++ b/test.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +set -eu + +export ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1 +export UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1 + +export PYTHON_SETUP_ARGS='--install-layout=deb' +export DESTDIR=/home/christian/Downloads/destdir/ +export OPT_SUBDIRS='dbus gui mcstrans restorecond semodule-utils' + +export CC=${CC:-'ccache gcc'} +export CFLAGS='-fsanitize=address,undefined -g -I$DESTDIR/usr/include -Wall -Wextra' +export LDFLAGS='-fsanitize=address,undefined -L$DESTDIR/usr/lib' + + +clear + +rm -Rf ~/Downloads/destdir/ + +make clean distclean + +make install -j4 +make install-pywrap -j4 +make all -j4 + +./scripts/env_use_destdir make test -j4