[vala/wip/ci: 7/16] build: Add --enable-test-asan configure option
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/ci: 7/16] build: Add --enable-test-asan configure option
- Date: Sat, 27 Feb 2021 12:20:01 +0000 (UTC)
commit f3ffd959b3f8e2ac85c6ce73dc8d4a9aff301b92
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Thu Feb 4 14:19:57 2021 +0100
build: Add --enable-test-asan configure option
List XFAIL tests if address sanatizer is enabled
configure.ac | 7 +++++++
tests/Makefile.am | 8 ++++++++
2 files changed, 15 insertions(+)
---
diff --git a/configure.ac b/configure.ac
index 66cbd52a3..ec67d71bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -152,6 +152,13 @@ for flag in $TEST_EXTRA_CFLAGS; do
AX_CHECK_COMPILE_FLAG([$flag],[TEST_CFLAGS="$TEST_CFLAGS $flag"])
done
+AC_ARG_ENABLE(test-asan, AS_HELP_STRING([--enable-test-asan], [Enable Address Sanitizer analysis for
tests]), enable_test_asan=$enableval, enable_test_asan=no)
+AM_CONDITIONAL(ENABLE_TEST_ASAN, test x$enable_test_asan = xyes)
+
+if test "$enable_test_asan" = "yes"; then
+ TEST_CFLAGS="$TEST_CFLAGS -g3 -fsanitize=address -fno-omit-frame-pointer"
+fi
+
AC_SUBST(TEST_CFLAGS)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index fe064e2f8..3a2b5aaea 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1208,6 +1208,14 @@ LINUX_TESTS += \
$(NULL)
endif
+if ENABLE_TEST_ASAN
+XFAIL_TESTS = \
+ objects/property-array.vala \
+ dbus/errors.test \
+ dbus/filedescriptor-errors.test \
+ $(NULL)
+endif
+
EXTRA_DIST = \
gtktemplate/tests-extra-environment.sh \
linux/tests-extra-environment.sh \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]