summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-10-01 19:25:41 +0000
committerMatthias Clasen <mclasen@redhat.com>2020-10-01 19:25:41 +0000
commit4d47d937100973a9ffe80c86732ff7c66afa6c2b (patch)
tree4c51e062215f30a2bcab063954c06db9c5d03ead
parentcb88c112346c3224ce1e903d84c864e1af1d7e9c (diff)
parente043511635ce8d627f40054d22a876f1c189db46 (diff)
downloadgtk-doc-4d47d937100973a9ffe80c86732ff7c66afa6c2b.tar.gz
Merge branch 'wip/smcv/qsort-null-test' into 'master'
tests: Pass address-sanitizer options when building GObject scanner See merge request GNOME/gtk-doc!54
-rw-r--r--tests/gobject/docs/meson.build19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/gobject/docs/meson.build b/tests/gobject/docs/meson.build
index be8c01c..a1dd66c 100644
--- a/tests/gobject/docs/meson.build
+++ b/tests/gobject/docs/meson.build
@@ -46,6 +46,22 @@ test(
],
)
+sanitizer_args = []
+
+if get_option('b_sanitize') == 'address' or get_option('b_sanitize') == 'address,undefined'
+ sanitizer_args += [
+ '--extra-cflags=-fsanitize=address',
+ '--ldflags=-fsanitize=address',
+ ]
+endif
+
+if get_option('b_sanitize') == 'undefined' or get_option('b_sanitize') == 'address,undefined'
+ sanitizer_args += [
+ '--extra-cflags=-fsanitize=undefined',
+ '--ldflags=-fsanitize=undefined',
+ ]
+endif
+
test(
'test-gobject-scangobj',
python_prg,
@@ -59,6 +75,9 @@ test(
'--extra-pkg=@0@'.format('gobject-2.0'),
'--extra-lib=@0@'.format(gobject_test_lib.full_path()),
'--module=@0@'.format('tester'),
+ ] + sanitizer_args,
+ env: [
+ 'ASAN_OPTIONS=detect_leaks=0',
],
)