[sysprof] build: disable some tests w/o libsysprof



commit 690bf90a143f06948759825b2382346e2a399ba0
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jun 3 12:32:13 2019 -0700

    build: disable some tests w/o libsysprof

 src/tests/meson.build | 34 +++++++++++++++++++---------------
 1 file changed, 19 insertions(+), 15 deletions(-)
---
diff --git a/src/tests/meson.build b/src/tests/meson.build
index 4534f7d..7cebc3c 100644
--- a/src/tests/meson.build
+++ b/src/tests/meson.build
@@ -6,40 +6,43 @@ 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_addr_map = executable('test-addr-map',
-  ['test-addr-map.c',
-   '../libsysprof/sysprof-map-lookaside.c',
-   '../libsysprof/sysprof-symbol-map.c'],
+test_capture = executable('test-capture', 'test-capture.c',
         c_args: test_cflags,
-  dependencies: test_deps,
+  dependencies: [libsysprof_capture_dep],
 )
 
-test_addr_decode = executable('test-addr-decode', 'test-addr-decode.c',
+test_capture_cursor = executable('test-capture-cursor', 'test-capture-cursor.c',
         c_args: test_cflags,
-  dependencies: test_deps,
+  dependencies: [libsysprof_capture_dep],
 )
 
-test_capture = executable('test-capture', 'test-capture.c',
+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',
+   '../libsysprof/sysprof-symbol-map.c'],
         c_args: test_cflags,
   dependencies: test_deps,
 )
 
-test_capture_cursor = executable('test-capture-cursor', 'test-capture-cursor.c',
+test_addr_decode = executable('test-addr-decode', 'test-addr-decode.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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]