diff options
author | Igor V. Kovalenko <igor.v.kovalenko@gmail.com> | 2021-11-04 19:33:32 +0300 |
---|---|---|
committer | PulseAudio Marge Bot <pulseaudio-maintainers@lists.freedesktop.org> | 2021-11-17 16:06:23 +0000 |
commit | 6dd14ad9f142dedda26a6558bb741bc6f3199ff2 (patch) | |
tree | bc1d5bd43ff705a1ff3b131b90c6cce4848a6644 | |
parent | 6928714b6486ca22ef2da87e1338a8a73100e5db (diff) |
build-sys: meson: Move remaining tests under daemon and client builds
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>
-rw-r--r-- | src/tests/meson.build | 126 |
1 files changed, 62 insertions, 64 deletions
diff --git a/src/tests/meson.build b/src/tests/meson.build index 1770ccac3..01a827b1e 100644 --- a/src/tests/meson.build +++ b/src/tests/meson.build @@ -9,32 +9,47 @@ default_tests = [] -default_tests += [ - [ 'channelmap-test', 'channelmap-test.c', - [ check_dep, libpulse_dep ] ], - [ 'core-util-test', 'core-util-test.c', - [ check_dep, libpulse_dep, libpulsecommon_dep ] ], - [ 'get-binary-name-test', 'get-binary-name-test.c', - [ check_dep, libpulse_dep, libpulsecommon_dep ] ], - [ 'hashmap-test', 'hashmap-test.c', - [ check_dep, libpulse_dep, libpulsecommon_dep ] ], - [ 'json-test', 'json-test.c', - [ check_dep, libpulse_dep, libpulsecommon_dep ] ], - [ 'proplist-test', 'proplist-test.c', - [ check_dep, libpulse_dep, libpulsecommon_dep ] ], - [ 'thread-mainloop-test', 'thread-mainloop-test.c', - [ check_dep, libpulse_dep, libpulsecommon_dep ] ], - [ 'utf8-test', 'utf8-test.c', - [ check_dep, libpulse_dep, libpulsecommon_dep ] ], - [ 'volume-test', 'volume-test.c', - [ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep ] ], -] - if get_option('client') default_tests += [ + [ 'channelmap-test', 'channelmap-test.c', + [ check_dep, libpulse_dep ] ], + [ 'core-util-test', 'core-util-test.c', + [ check_dep, libpulse_dep, libpulsecommon_dep ] ], + [ 'get-binary-name-test', 'get-binary-name-test.c', + [ check_dep, libpulse_dep, libpulsecommon_dep ] ], + [ 'hashmap-test', 'hashmap-test.c', + [ check_dep, libpulse_dep, libpulsecommon_dep ] ], + [ 'json-test', 'json-test.c', + [ check_dep, libpulse_dep, libpulsecommon_dep ] ], + [ 'proplist-test', 'proplist-test.c', + [ check_dep, libpulse_dep, libpulsecommon_dep ] ], + [ 'thread-mainloop-test', 'thread-mainloop-test.c', + [ check_dep, libpulse_dep, libpulsecommon_dep ] ], + [ 'utf8-test', 'utf8-test.c', + [ check_dep, libpulse_dep, libpulsecommon_dep ] ], + [ 'volume-test', 'volume-test.c', + [ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep ] ], + ] + + default_tests += [ [ 'mainloop-test', 'mainloop-test.c', [ check_dep, libpulse_dep, libpulsecommon_dep ] ], ] + + if cc.has_header('sys/eventfd.h') + default_tests += [ + [ 'srbchannel-test', 'srbchannel-test.c', + [ check_dep, libpulse_dep, libpulsecommon_dep ] ] + ] + endif + + if glib_dep.found() + default_tests += [ + [ 'mainloop-test-glib', 'mainloop-test.c', + [ check_dep, glib_dep, libpulse_dep, libpulsecommon_dep, libpulse_mainloop_glib_dep ], + [], ['-DGLIB_MAIN_LOOP'] ] + ] + endif endif if get_option('daemon') @@ -103,16 +118,6 @@ if get_option('daemon') ] endif -endif - -if cc.has_header('sys/eventfd.h') - default_tests += [ - [ 'srbchannel-test', 'srbchannel-test.c', - [ check_dep, libpulse_dep, libpulsecommon_dep ] ] - ] -endif - -if get_option('daemon') if alsa_dep.found() default_tests += [ [ 'alsa-mixer-path-test', 'alsa-mixer-path-test.c', @@ -122,23 +127,24 @@ if get_option('daemon') endif endif -if glib_dep.found() - default_tests += [ - [ 'mainloop-test-glib', 'mainloop-test.c', - [ check_dep, glib_dep, libpulse_dep, libpulsecommon_dep, libpulse_mainloop_glib_dep ], - [], ['-DGLIB_MAIN_LOOP'] ] - ] -endif - # No-run tests norun_tests = [] -norun_tests += [ - [ 'pacat-simple', 'pacat-simple.c', - [ libpulse_dep, libpulse_simple_dep ] ], - [ 'parec-simple', 'parec-simple.c', - [ libpulse_dep, libpulse_simple_dep ] ], -] +if get_option('client') + norun_tests += [ + [ 'pacat-simple', 'pacat-simple.c', + [ libpulse_dep, libpulse_simple_dep ] ], + [ 'parec-simple', 'parec-simple.c', + [ libpulse_dep, libpulse_simple_dep ] ], + ] + + if gtk_dep.found() and glib_dep.found() + norun_tests += [ + [ 'gtk-test', 'gtk-test.c', + [ gtk_dep, libpulse_dep, libpulse_mainloop_glib_dep ] ] + ] + endif +endif if get_option('daemon') norun_tests += [ @@ -184,26 +190,18 @@ if get_option('daemon') ] endif -endif - -if cc.has_function('pthread_setaffinity_np', dependencies : thread_dep) - norun_tests += [ - [ 'atomic-test', 'atomic-test.c', - [ check_dep, libpulsecommon_dep, thread_dep ] ] - ] -endif - -if alsa_dep.found() - norun_tests += [ - [ 'alsa-time-test', 'alsa-time-test.c', [ alsa_dep, thread_dep ] ] - ] -endif + if cc.has_function('pthread_setaffinity_np', dependencies : thread_dep) + norun_tests += [ + [ 'atomic-test', 'atomic-test.c', + [ check_dep, libpulsecommon_dep, thread_dep ] ] + ] + endif -if gtk_dep.found() and glib_dep.found() - norun_tests += [ - [ 'gtk-test', 'gtk-test.c', - [ gtk_dep, libpulse_dep, libpulse_mainloop_glib_dep ] ] - ] + if alsa_dep.found() + norun_tests += [ + [ 'alsa-time-test', 'alsa-time-test.c', [ alsa_dep, thread_dep ] ] + ] + endif endif # Generate tests |