mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
build-sys: meson: allow building client libraries only
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/540>
This commit is contained in:
parent
1a73fb9eb9
commit
424580a901
9 changed files with 291 additions and 188 deletions
|
|
@ -1,18 +1,25 @@
|
||||||
|
|
||||||
# man page name, section, [aliases]
|
# man page name, section, [aliases]
|
||||||
manpages = [
|
manpages = []
|
||||||
['default.pa', '5'],
|
|
||||||
|
if get_option('daemon')
|
||||||
|
manpages += [
|
||||||
|
['default.pa', '5'],
|
||||||
|
['pacmd', '1'],
|
||||||
|
['pasuspender', '1'],
|
||||||
|
['pulse-cli-syntax', '5'],
|
||||||
|
['pulse-daemon.conf', '5'],
|
||||||
|
['pulseaudio', '1'],
|
||||||
|
['start-pulseaudio-x11', '1'],
|
||||||
|
]
|
||||||
|
endif
|
||||||
|
|
||||||
|
manpages += [
|
||||||
['pacat', '1', ['paplay', 'parec', 'parecord', 'pamon']],
|
['pacat', '1', ['paplay', 'parec', 'parecord', 'pamon']],
|
||||||
['pacmd', '1'],
|
|
||||||
['pactl', '1'],
|
['pactl', '1'],
|
||||||
['padsp', '1'],
|
['padsp', '1'],
|
||||||
['pasuspender', '1'],
|
|
||||||
['pax11publish', '1'],
|
['pax11publish', '1'],
|
||||||
['pulse-cli-syntax', '5'],
|
|
||||||
['pulse-client.conf', '5'],
|
['pulse-client.conf', '5'],
|
||||||
['pulse-daemon.conf', '5'],
|
|
||||||
['pulseaudio', '1'],
|
|
||||||
['start-pulseaudio-x11', '1'],
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# FIXME: Add esdcompat if HAVE_ESOUND
|
# FIXME: Add esdcompat if HAVE_ESOUND
|
||||||
|
|
|
||||||
|
|
@ -881,6 +881,8 @@ summary = [
|
||||||
# 'CFLAGS: @0@'.format(${CFLAGS}),
|
# 'CFLAGS: @0@'.format(${CFLAGS}),
|
||||||
# 'CPPFLAGS: @0@'.format(${CPPFLAGS}),
|
# 'CPPFLAGS: @0@'.format(${CPPFLAGS}),
|
||||||
# 'LIBS: @0@'.format(${LIBS}),
|
# 'LIBS: @0@'.format(${LIBS}),
|
||||||
|
'',
|
||||||
|
'Enable pulseaudio daemon: @0@'.format(get_option('daemon')),
|
||||||
'',
|
'',
|
||||||
'Enable memfd shared memory: @0@'.format(cdata.has('HAVE_MEMFD')),
|
'Enable memfd shared memory: @0@'.format(cdata.has('HAVE_MEMFD')),
|
||||||
'Enable X11: @0@'.format(x11_dep.found()),
|
'Enable X11: @0@'.format(x11_dep.found()),
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
option('daemon',
|
||||||
|
type : 'boolean', value : true,
|
||||||
|
description : 'Enable building and installation of pulseaudio daemon and supporting configuration files')
|
||||||
option('gcov',
|
option('gcov',
|
||||||
type : 'boolean', value : false,
|
type : 'boolean', value : false,
|
||||||
description : 'Enable optional gcov coverage analysis')
|
description : 'Enable optional gcov coverage analysis')
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,20 @@
|
||||||
if bashcompletiondir != 'no'
|
if bashcompletiondir != 'no'
|
||||||
aliases = [
|
aliases = []
|
||||||
|
|
||||||
|
if get_option('daemon')
|
||||||
|
aliases += [
|
||||||
|
'pacmd',
|
||||||
|
'pasuspender',
|
||||||
|
]
|
||||||
|
endif
|
||||||
|
|
||||||
|
aliases += [
|
||||||
'pacat',
|
'pacat',
|
||||||
'pacmd',
|
|
||||||
'pactl',
|
'pactl',
|
||||||
'padsp',
|
'padsp',
|
||||||
'paplay',
|
'paplay',
|
||||||
'parec',
|
'parec',
|
||||||
'parecord',
|
'parecord',
|
||||||
'pasuspender',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
install_data('pulseaudio', install_dir : bashcompletiondir)
|
install_data('pulseaudio', install_dir : bashcompletiondir)
|
||||||
|
|
|
||||||
|
|
@ -206,9 +206,11 @@ libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
|
||||||
libpulsecommon_dep = declare_dependency(link_with: libpulsecommon)
|
libpulsecommon_dep = declare_dependency(link_with: libpulsecommon)
|
||||||
|
|
||||||
subdir('pulse')
|
subdir('pulse')
|
||||||
subdir('pulsecore')
|
if get_option('daemon')
|
||||||
subdir('daemon')
|
subdir('pulsecore')
|
||||||
subdir('modules')
|
subdir('daemon')
|
||||||
|
subdir('modules')
|
||||||
|
endif
|
||||||
if get_option('tests')
|
if get_option('tests')
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
|
|
@ -7,85 +7,95 @@
|
||||||
|
|
||||||
# Default tests
|
# Default tests
|
||||||
|
|
||||||
default_tests = [
|
default_tests = []
|
||||||
[ 'asyncmsgq-test', 'asyncmsgq-test.c',
|
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
default_tests += [
|
||||||
[ 'asyncq-test', 'asyncq-test.c',
|
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'channelmap-test', 'channelmap-test.c',
|
[ 'channelmap-test', 'channelmap-test.c',
|
||||||
[ check_dep, libpulse_dep ] ],
|
[ check_dep, libpulse_dep ] ],
|
||||||
[ 'close-test', 'close-test.c',
|
|
||||||
[ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'core-util-test', 'core-util-test.c',
|
[ 'core-util-test', 'core-util-test.c',
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
||||||
[ 'cpu-mix-test', [ 'cpu-mix-test.c', 'runtime-test-util.h' ],
|
|
||||||
[ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'cpu-remap-test', [ 'cpu-remap-test.c', 'runtime-test-util.h' ],
|
|
||||||
[ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'cpu-sconv-test', [ 'cpu-sconv-test.c', 'runtime-test-util.h' ],
|
|
||||||
[ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'cpu-volume-test', [ 'cpu-volume-test.c', 'runtime-test-util.h' ],
|
|
||||||
[ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'format-test', 'format-test.c',
|
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'get-binary-name-test', 'get-binary-name-test.c',
|
[ 'get-binary-name-test', 'get-binary-name-test.c',
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
||||||
[ 'hashmap-test', 'hashmap-test.c',
|
[ 'hashmap-test', 'hashmap-test.c',
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
||||||
[ 'hook-list-test', 'hook-list-test.c',
|
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'json-test', 'json-test.c',
|
[ 'json-test', 'json-test.c',
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
||||||
[ 'lfe-filter-test', 'lfe-filter-test.c',
|
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'lock-autospawn-test', 'lock-autospawn-test.c',
|
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'mainloop-test', 'mainloop-test.c',
|
[ 'mainloop-test', 'mainloop-test.c',
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
||||||
[ 'memblock-test', 'memblock-test.c',
|
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'memblockq-test', 'memblockq-test.c',
|
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'mix-test', 'mix-test.c',
|
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'mult-s16-test', [ 'mult-s16-test.c', 'runtime-test-util.h' ],
|
|
||||||
[ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'proplist-test', 'proplist-test.c',
|
[ 'proplist-test', 'proplist-test.c',
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
||||||
[ 'queue-test', 'queue-test.c',
|
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'resampler-test', 'resampler-test.c',
|
|
||||||
[ libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libintl_dep ] ],
|
|
||||||
[ 'rtpoll-test', 'rtpoll-test.c',
|
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'smoother-test', 'smoother-test.c',
|
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'strlist-test', 'strlist-test.c',
|
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'thread-mainloop-test', 'thread-mainloop-test.c',
|
[ 'thread-mainloop-test', 'thread-mainloop-test.c',
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
||||||
[ 'thread-test', 'thread-test.c',
|
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'utf8-test', 'utf8-test.c',
|
[ 'utf8-test', 'utf8-test.c',
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
||||||
[ 'volume-test', 'volume-test.c',
|
[ 'volume-test', 'volume-test.c',
|
||||||
[ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep ] ],
|
[ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep ] ],
|
||||||
]
|
]
|
||||||
|
|
||||||
if host_machine.system() != 'windows'
|
if get_option('daemon')
|
||||||
default_tests += [
|
default_tests += [
|
||||||
[ 'sigbus-test', 'sigbus-test.c',
|
[ 'asyncmsgq-test', 'asyncmsgq-test.c',
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
[ 'usergroup-test', 'usergroup-test.c',
|
[ 'asyncq-test', 'asyncq-test.c',
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'close-test', 'close-test.c',
|
||||||
|
[ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'cpu-mix-test', [ 'cpu-mix-test.c', 'runtime-test-util.h' ],
|
||||||
|
[ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'cpu-remap-test', [ 'cpu-remap-test.c', 'runtime-test-util.h' ],
|
||||||
|
[ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'cpu-sconv-test', [ 'cpu-sconv-test.c', 'runtime-test-util.h' ],
|
||||||
|
[ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'cpu-volume-test', [ 'cpu-volume-test.c', 'runtime-test-util.h' ],
|
||||||
|
[ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'format-test', 'format-test.c',
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'hook-list-test', 'hook-list-test.c',
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'lfe-filter-test', 'lfe-filter-test.c',
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'lock-autospawn-test', 'lock-autospawn-test.c',
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'memblock-test', 'memblock-test.c',
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'memblockq-test', 'memblockq-test.c',
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'mix-test', 'mix-test.c',
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'mult-s16-test', [ 'mult-s16-test.c', 'runtime-test-util.h' ],
|
||||||
|
[ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'proplist-modargs-test', 'proplist-modargs-test.c',
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'queue-test', 'queue-test.c',
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'resampler-test', 'resampler-test.c',
|
||||||
|
[ libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libintl_dep ] ],
|
||||||
|
[ 'rtpoll-test', 'rtpoll-test.c',
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'smoother-test', 'smoother-test.c',
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'strlist-test', 'strlist-test.c',
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'thread-test', 'thread-test.c',
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
]
|
]
|
||||||
endif
|
|
||||||
|
|
||||||
if host_machine.system() != 'darwin'
|
if host_machine.system() != 'windows'
|
||||||
default_tests += [
|
default_tests += [
|
||||||
[ 'once-test', 'once-test.c',
|
[ 'sigbus-test', 'sigbus-test.c',
|
||||||
[ check_dep, thread_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libatomic_ops_dep ] ],
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
]
|
[ 'usergroup-test', 'usergroup-test.c',
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
]
|
||||||
|
endif
|
||||||
|
|
||||||
|
if host_machine.system() != 'darwin'
|
||||||
|
default_tests += [
|
||||||
|
[ 'once-test', 'once-test.c',
|
||||||
|
[ check_dep, thread_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libatomic_ops_dep ] ],
|
||||||
|
]
|
||||||
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if cc.has_header('sys/eventfd.h')
|
if cc.has_header('sys/eventfd.h')
|
||||||
|
|
@ -95,12 +105,14 @@ if cc.has_header('sys/eventfd.h')
|
||||||
]
|
]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if alsa_dep.found()
|
if get_option('daemon')
|
||||||
default_tests += [
|
if alsa_dep.found()
|
||||||
[ 'alsa-mixer-path-test', 'alsa-mixer-path-test.c',
|
default_tests += [
|
||||||
[ alsa_dep, check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ],
|
[ 'alsa-mixer-path-test', 'alsa-mixer-path-test.c',
|
||||||
libalsa_util ]
|
[ alsa_dep, check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ],
|
||||||
]
|
libalsa_util ]
|
||||||
|
]
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if glib_dep.found()
|
if glib_dep.found()
|
||||||
|
|
@ -112,52 +124,59 @@ if glib_dep.found()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# No-run tests
|
# No-run tests
|
||||||
|
norun_tests = []
|
||||||
|
|
||||||
norun_tests = [
|
norun_tests += [
|
||||||
[ 'flist-test', 'flist-test.c',
|
|
||||||
[ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'ipacl-test', 'ipacl-test.c',
|
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'lo-latency-test', [ 'lo-latency-test.c', 'lo-test-util.c', 'lo-test-util.h' ],
|
|
||||||
[ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'mcalign-test', 'mcalign-test.c',
|
|
||||||
[ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'pacat-simple', 'pacat-simple.c',
|
[ 'pacat-simple', 'pacat-simple.c',
|
||||||
[ libpulse_dep, libpulse_simple_dep ] ],
|
[ libpulse_dep, libpulse_simple_dep ] ],
|
||||||
[ 'parec-simple', 'parec-simple.c',
|
[ 'parec-simple', 'parec-simple.c',
|
||||||
[ libpulse_dep, libpulse_simple_dep ] ],
|
[ libpulse_dep, libpulse_simple_dep ] ],
|
||||||
[ 'remix-test', 'remix-test.c',
|
|
||||||
[ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'rtstutter', 'rtstutter.c',
|
|
||||||
[ thread_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'sig2str-test', 'sig2str-test.c',
|
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
[ 'stripnul', 'stripnul.c',
|
|
||||||
[ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# echo-cancel test is a bit tedious to handle
|
if get_option('daemon')
|
||||||
echo_cancel_test_sources = []
|
|
||||||
foreach s : module_echo_cancel_sources
|
|
||||||
echo_cancel_test_sources += '../modules/' + s
|
|
||||||
endforeach
|
|
||||||
echo_cancel_test_sources += module_echo_cancel_orc_sources
|
|
||||||
|
|
||||||
norun_tests += [
|
|
||||||
[ 'echo-cancel-test', echo_cancel_test_sources,
|
|
||||||
module_echo_cancel_deps + [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libintl_dep ],
|
|
||||||
module_echo_cancel_libs,
|
|
||||||
module_echo_cancel_flags + server_c_args + [ '-DPA_MODULE_NAME=module_echo_cancel', '-DECHO_CANCEL_TEST=1' ] ]
|
|
||||||
]
|
|
||||||
|
|
||||||
if cc.has_header_symbol('signal.h', 'SIGXCPU')
|
|
||||||
norun_tests += [
|
norun_tests += [
|
||||||
[ 'cpulimit-test', [ 'cpulimit-test.c', '../daemon/cpulimit.c', '../daemon/cpulimit.h' ],
|
[ 'flist-test', 'flist-test.c',
|
||||||
|
[ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'ipacl-test', 'ipacl-test.c',
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
[ 'cpulimit-test2', [ 'cpulimit-test.c', '../daemon/cpulimit.c', '../daemon/cpulimit.h' ],
|
[ 'lo-latency-test', [ 'lo-latency-test.c', 'lo-test-util.c', 'lo-test-util.h' ],
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ],
|
[ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
[], ['-DTEST2'] ],
|
[ 'mcalign-test', 'mcalign-test.c',
|
||||||
|
[ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'remix-test', 'remix-test.c',
|
||||||
|
[ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'rtstutter', 'rtstutter.c',
|
||||||
|
[ thread_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'sig2str-test', 'sig2str-test.c',
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'stripnul', 'stripnul.c',
|
||||||
|
[ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# echo-cancel test is a bit tedious to handle
|
||||||
|
echo_cancel_test_sources = []
|
||||||
|
foreach s : module_echo_cancel_sources
|
||||||
|
echo_cancel_test_sources += '../modules/' + s
|
||||||
|
endforeach
|
||||||
|
echo_cancel_test_sources += module_echo_cancel_orc_sources
|
||||||
|
|
||||||
|
norun_tests += [
|
||||||
|
[ 'echo-cancel-test', echo_cancel_test_sources,
|
||||||
|
module_echo_cancel_deps + [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libintl_dep ],
|
||||||
|
module_echo_cancel_libs,
|
||||||
|
module_echo_cancel_flags + server_c_args + [ '-DPA_MODULE_NAME=module_echo_cancel', '-DECHO_CANCEL_TEST=1' ] ]
|
||||||
|
]
|
||||||
|
|
||||||
|
if cc.has_header_symbol('signal.h', 'SIGXCPU')
|
||||||
|
norun_tests += [
|
||||||
|
[ 'cpulimit-test', [ 'cpulimit-test.c', '../daemon/cpulimit.c', '../daemon/cpulimit.h' ],
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
[ 'cpulimit-test2', [ 'cpulimit-test.c', '../daemon/cpulimit.c', '../daemon/cpulimit.h' ],
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ],
|
||||||
|
[], ['-DTEST2'] ],
|
||||||
|
]
|
||||||
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if cc.has_function('pthread_setaffinity_np', dependencies : thread_dep)
|
if cc.has_function('pthread_setaffinity_np', dependencies : thread_dep)
|
||||||
|
|
@ -207,47 +226,51 @@ foreach t : default_tests + norun_tests
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
# These tests need a running pulseaudio daemon
|
if get_option('daemon')
|
||||||
|
|
||||||
daemon_tests = [
|
# These tests need a running pulseaudio daemon
|
||||||
[ 'extended-test', 'extended-test.c',
|
|
||||||
[ check_dep, libm_dep, libpulse_dep ] ],
|
|
||||||
[ 'sync-playback', 'sync-playback.c',
|
|
||||||
[ check_dep, libm_dep, libpulse_dep ] ],
|
|
||||||
]
|
|
||||||
|
|
||||||
daemon_tests_long = [
|
daemon_tests = [
|
||||||
[ 'connect-stress', 'connect-stress.c',
|
[ 'extended-test', 'extended-test.c',
|
||||||
[ check_dep, libpulse_dep ] ],
|
[ check_dep, libm_dep, libpulse_dep ] ],
|
||||||
[ 'interpol-test', 'interpol-test.c',
|
[ 'sync-playback', 'sync-playback.c',
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
[ check_dep, libm_dep, libpulse_dep ] ],
|
||||||
]
|
]
|
||||||
|
|
||||||
daemon_test_names = []
|
daemon_tests_long = [
|
||||||
daemon_test_long_names = []
|
[ 'connect-stress', 'connect-stress.c',
|
||||||
|
[ check_dep, libpulse_dep ] ],
|
||||||
|
[ 'interpol-test', 'interpol-test.c',
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
|
||||||
|
]
|
||||||
|
|
||||||
foreach t : daemon_tests + daemon_tests_long
|
daemon_test_names = []
|
||||||
name = t[0]
|
daemon_test_long_names = []
|
||||||
sources = t[1]
|
|
||||||
deps = t[2]
|
|
||||||
|
|
||||||
if daemon_tests.contains(t)
|
foreach t : daemon_tests + daemon_tests_long
|
||||||
daemon_test_names += name
|
name = t[0]
|
||||||
else
|
sources = t[1]
|
||||||
daemon_test_long_names += name
|
deps = t[2]
|
||||||
endif
|
|
||||||
|
|
||||||
executable(name, sources,
|
if daemon_tests.contains(t)
|
||||||
c_args : pa_c_args,
|
daemon_test_names += name
|
||||||
include_directories : [ configinc, topinc ],
|
else
|
||||||
dependencies : deps,
|
daemon_test_long_names += name
|
||||||
|
endif
|
||||||
|
|
||||||
|
executable(name, sources,
|
||||||
|
c_args : pa_c_args,
|
||||||
|
include_directories : [ configinc, topinc ],
|
||||||
|
dependencies : deps,
|
||||||
|
)
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
test_daemon_meson_sh = find_program('test-daemon.meson.sh')
|
||||||
|
run_target('test-daemon',
|
||||||
|
command : [ test_daemon_meson_sh ] + daemon_test_names
|
||||||
|
)
|
||||||
|
run_target('test-daemon-long',
|
||||||
|
command : [ test_daemon_meson_sh ] + daemon_test_long_names
|
||||||
)
|
)
|
||||||
endforeach
|
|
||||||
|
|
||||||
test_daemon_meson_sh = find_program('test-daemon.meson.sh')
|
endif
|
||||||
run_target('test-daemon',
|
|
||||||
command : [ test_daemon_meson_sh ] + daemon_test_names
|
|
||||||
)
|
|
||||||
run_target('test-daemon-long',
|
|
||||||
command : [ test_daemon_meson_sh ] + daemon_test_long_names
|
|
||||||
)
|
|
||||||
|
|
|
||||||
73
src/tests/proplist-modargs-test.c
Normal file
73
src/tests/proplist-modargs-test.c
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
/***
|
||||||
|
This file is part of PulseAudio.
|
||||||
|
|
||||||
|
PulseAudio is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Lesser General Public License as published
|
||||||
|
by the Free Software Foundation; either version 2.1 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
PulseAudio is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
***/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <check.h>
|
||||||
|
|
||||||
|
#include <pulse/proplist.h>
|
||||||
|
#include <pulse/xmalloc.h>
|
||||||
|
#include <pulsecore/macro.h>
|
||||||
|
#include <pulsecore/core-util.h>
|
||||||
|
#include <pulsecore/modargs.h>
|
||||||
|
|
||||||
|
START_TEST (proplist_modargs_test) {
|
||||||
|
pa_modargs *ma;
|
||||||
|
pa_proplist *a;
|
||||||
|
char *v;
|
||||||
|
const char *x[] = { "foo", NULL };
|
||||||
|
|
||||||
|
ma = pa_modargs_new("foo='foobar=waldo foo2=\"lj\\\"dhflh\" foo3=\"kjlskj\\'\"'", x);
|
||||||
|
fail_unless(ma != NULL);
|
||||||
|
a = pa_proplist_new();
|
||||||
|
fail_unless(a != NULL);
|
||||||
|
|
||||||
|
fail_unless(pa_modargs_get_proplist(ma, "foo", a, PA_UPDATE_REPLACE) >= 0);
|
||||||
|
|
||||||
|
pa_log_debug("%s", v = pa_proplist_to_string(a));
|
||||||
|
pa_xfree(v);
|
||||||
|
|
||||||
|
pa_proplist_free(a);
|
||||||
|
pa_modargs_free(ma);
|
||||||
|
}
|
||||||
|
END_TEST
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
int failed = 0;
|
||||||
|
Suite *s;
|
||||||
|
TCase *tc;
|
||||||
|
SRunner *sr;
|
||||||
|
|
||||||
|
if (!getenv("MAKE_CHECK"))
|
||||||
|
pa_log_set_level(PA_LOG_DEBUG);
|
||||||
|
|
||||||
|
s = suite_create("Property List");
|
||||||
|
tc = tcase_create("propertylist");
|
||||||
|
tcase_add_test(tc, proplist_modargs_test);
|
||||||
|
suite_add_tcase(s, tc);
|
||||||
|
|
||||||
|
sr = srunner_create(s);
|
||||||
|
srunner_run_all(sr, CK_NORMAL);
|
||||||
|
failed = srunner_ntests_failed(sr);
|
||||||
|
srunner_free(sr);
|
||||||
|
|
||||||
|
return (failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
@ -25,16 +25,13 @@
|
||||||
|
|
||||||
#include <pulse/proplist.h>
|
#include <pulse/proplist.h>
|
||||||
#include <pulse/xmalloc.h>
|
#include <pulse/xmalloc.h>
|
||||||
#include <pulsecore/macro.h>
|
#include <pulsecore/log.h>
|
||||||
#include <pulsecore/core-util.h>
|
#include <pulsecore/core-util.h>
|
||||||
#include <pulsecore/modargs.h>
|
|
||||||
|
|
||||||
START_TEST (proplist_test) {
|
START_TEST (proplist_test) {
|
||||||
pa_modargs *ma;
|
|
||||||
pa_proplist *a, *b, *c, *d;
|
pa_proplist *a, *b, *c, *d;
|
||||||
char *s, *t, *u, *v;
|
char *s, *t, *u, *v;
|
||||||
const char *text;
|
const char *text;
|
||||||
const char *x[] = { "foo", NULL };
|
|
||||||
|
|
||||||
a = pa_proplist_new();
|
a = pa_proplist_new();
|
||||||
fail_unless(pa_proplist_sets(a, PA_PROP_MEDIA_TITLE, "Brandenburgische Konzerte") == 0);
|
fail_unless(pa_proplist_sets(a, PA_PROP_MEDIA_TITLE, "Brandenburgische Konzerte") == 0);
|
||||||
|
|
@ -80,19 +77,6 @@ START_TEST (proplist_test) {
|
||||||
pa_proplist_free(d);
|
pa_proplist_free(d);
|
||||||
pa_log_debug("%s", v);
|
pa_log_debug("%s", v);
|
||||||
pa_xfree(v);
|
pa_xfree(v);
|
||||||
|
|
||||||
ma = pa_modargs_new("foo='foobar=waldo foo2=\"lj\\\"dhflh\" foo3=\"kjlskj\\'\"'", x);
|
|
||||||
fail_unless(ma != NULL);
|
|
||||||
a = pa_proplist_new();
|
|
||||||
fail_unless(a != NULL);
|
|
||||||
|
|
||||||
fail_unless(pa_modargs_get_proplist(ma, "foo", a, PA_UPDATE_REPLACE) >= 0);
|
|
||||||
|
|
||||||
pa_log_debug("%s", v = pa_proplist_to_string(a));
|
|
||||||
pa_xfree(v);
|
|
||||||
|
|
||||||
pa_proplist_free(a);
|
|
||||||
pa_modargs_free(ma);
|
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,34 +42,36 @@ executable('pactl',
|
||||||
c_args : pa_c_args,
|
c_args : pa_c_args,
|
||||||
)
|
)
|
||||||
|
|
||||||
if host_machine.system() != 'windows'
|
if get_option('daemon')
|
||||||
pasuspender_sources = [
|
if host_machine.system() != 'windows'
|
||||||
'pasuspender.c',
|
pasuspender_sources = [
|
||||||
]
|
'pasuspender.c',
|
||||||
|
]
|
||||||
|
|
||||||
executable('pasuspender',
|
executable('pasuspender',
|
||||||
pasuspender_sources,
|
pasuspender_sources,
|
||||||
install: true,
|
install: true,
|
||||||
install_rpath : privlibdir,
|
install_rpath : privlibdir,
|
||||||
include_directories : [configinc, topinc],
|
include_directories : [configinc, topinc],
|
||||||
link_with : [libpulsecommon, libpulse],
|
link_with : [libpulsecommon, libpulse],
|
||||||
dependencies: [libintl_dep],
|
dependencies: [libintl_dep],
|
||||||
c_args : pa_c_args,
|
c_args : pa_c_args,
|
||||||
)
|
)
|
||||||
|
|
||||||
pacmd_sources = [
|
pacmd_sources = [
|
||||||
'pacmd.c',
|
'pacmd.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
executable('pacmd',
|
executable('pacmd',
|
||||||
pacmd_sources,
|
pacmd_sources,
|
||||||
install: true,
|
install: true,
|
||||||
install_rpath : privlibdir,
|
install_rpath : privlibdir,
|
||||||
include_directories : [configinc, topinc],
|
include_directories : [configinc, topinc],
|
||||||
link_with : [libpulsecommon, libpulse],
|
link_with : [libpulsecommon, libpulse],
|
||||||
dependencies: [libintl_dep],
|
dependencies: [libintl_dep],
|
||||||
c_args : pa_c_args,
|
c_args : pa_c_args,
|
||||||
)
|
)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if x11_dep.found()
|
if x11_dep.found()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue