build: disable some tests w/o libsysprof

This commit is contained in:
Christian Hergert
2019-06-03 12:32:13 -07:00
parent ac1d9e4694
commit 690bf90a14

View File

@ -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