From 690bf90a143f06948759825b2382346e2a399ba0 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Mon, 3 Jun 2019 12:32:13 -0700 Subject: [PATCH] build: disable some tests w/o libsysprof --- src/tests/meson.build | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/tests/meson.build b/src/tests/meson.build index 4534f7df..7cebc3c3 100644 --- a/src/tests/meson.build +++ b/src/tests/meson.build @@ -6,15 +6,30 @@ test_env = [ 'MALLOC_CHECK_=2', ] -test_deps = [ - libsysprof_dep, -] - test_cflags = [ '-DTEST_DATA_DIR="@0@/data/"'.format(meson.current_source_dir()), '-DSYSPROF_COMPILATION=1', ] +test_capture = executable('test-capture', 'test-capture.c', + c_args: test_cflags, + dependencies: [libsysprof_capture_dep], +) + +test_capture_cursor = executable('test-capture-cursor', 'test-capture-cursor.c', + c_args: test_cflags, + dependencies: [libsysprof_capture_dep], +) + +test('test-capture', test_capture, env: test_env) +test('test-capture-cursor', test_capture_cursor, env: test_env) + +if get_option('libsysprof') + +test_deps = [ + libsysprof_dep, +] + test_addr_map = executable('test-addr-map', ['test-addr-map.c', '../libsysprof/sysprof-map-lookaside.c', @@ -28,18 +43,6 @@ test_addr_decode = executable('test-addr-decode', 'test-addr-decode.c', dependencies: test_deps, ) -test_capture = executable('test-capture', 'test-capture.c', - c_args: test_cflags, - dependencies: test_deps, -) - -test_capture_cursor = executable('test-capture-cursor', 'test-capture-cursor.c', - c_args: test_cflags, - dependencies: test_deps, -) - -test('test-capture', test_capture, env: test_env) -test('test-capture-cursor', test_capture_cursor, env: test_env) if get_option('enable_gtk') @@ -72,3 +75,4 @@ if get_option('enable_gtk') test('test-zoom', test_zoom, env: test_env) endif +endif