[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] 2 commits: build-sys: meson: allow building client libraries only
PulseAudio Marge Bot
gitlab at gitlab.freedesktop.org
Mon Apr 19 19:00:07 UTC 2021
PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio
Commits:
424580a9 by Igor V. Kovalenko at 2021-04-19T18:48:59+00:00
build-sys: meson: allow building client libraries only
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/540>
- - - - -
f760143c by Igor V. Kovalenko at 2021-04-19T18:48:59+00:00
build-sys: meson: do not install manpages for disabled parts
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/540>
- - - - -
9 changed files:
- man/meson.build
- meson.build
- meson_options.txt
- shell-completion/bash/meson.build
- src/meson.build
- src/tests/meson.build
- + src/tests/proplist-modargs-test.c
- src/tests/proplist-test.c
- src/utils/meson.build
Changes:
=====================================
man/meson.build
=====================================
@@ -1,20 +1,37 @@
# man page name, section, [aliases]
-manpages = [
- ['default.pa', '5'],
+manpages = []
+
+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']],
- ['pacmd', '1'],
['pactl', '1'],
- ['padsp', '1'],
- ['pasuspender', '1'],
- ['pax11publish', '1'],
- ['pulse-cli-syntax', '5'],
['pulse-client.conf', '5'],
- ['pulse-daemon.conf', '5'],
- ['pulseaudio', '1'],
- ['start-pulseaudio-x11', '1'],
]
+if cdata.has('HAVE_OSS_WRAPPER')
+ manpages += [
+ ['padsp', '1'],
+ ]
+endif
+
+if x11_dep.found()
+ manpages += [
+ ['pax11publish', '1'],
+ ]
+endif
+
# FIXME: Add esdcompat if HAVE_ESOUND
#manpages += ['esdcompat', '1'],
=====================================
meson.build
=====================================
@@ -881,6 +881,8 @@ summary = [
# 'CFLAGS: @0@'.format(${CFLAGS}),
# 'CPPFLAGS: @0@'.format(${CPPFLAGS}),
# 'LIBS: @0@'.format(${LIBS}),
+ '',
+ 'Enable pulseaudio daemon: @0@'.format(get_option('daemon')),
'',
'Enable memfd shared memory: @0@'.format(cdata.has('HAVE_MEMFD')),
'Enable X11: @0@'.format(x11_dep.found()),
=====================================
meson_options.txt
=====================================
@@ -1,3 +1,6 @@
+option('daemon',
+ type : 'boolean', value : true,
+ description : 'Enable building and installation of pulseaudio daemon and supporting configuration files')
option('gcov',
type : 'boolean', value : false,
description : 'Enable optional gcov coverage analysis')
=====================================
shell-completion/bash/meson.build
=====================================
@@ -1,13 +1,20 @@
if bashcompletiondir != 'no'
- aliases = [
+ aliases = []
+
+ if get_option('daemon')
+ aliases += [
+ 'pacmd',
+ 'pasuspender',
+ ]
+ endif
+
+ aliases += [
'pacat',
- 'pacmd',
'pactl',
'padsp',
'paplay',
'parec',
'parecord',
- 'pasuspender',
]
install_data('pulseaudio', install_dir : bashcompletiondir)
=====================================
src/meson.build
=====================================
@@ -206,9 +206,11 @@ libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
libpulsecommon_dep = declare_dependency(link_with: libpulsecommon)
subdir('pulse')
-subdir('pulsecore')
-subdir('daemon')
-subdir('modules')
+if get_option('daemon')
+ subdir('pulsecore')
+ subdir('daemon')
+ subdir('modules')
+endif
if get_option('tests')
subdir('tests')
endif
=====================================
src/tests/meson.build
=====================================
@@ -7,85 +7,95 @@
# Default tests
-default_tests = [
- [ 'asyncmsgq-test', 'asyncmsgq-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'asyncq-test', 'asyncq-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+default_tests = []
+
+default_tests += [
[ 'channelmap-test', 'channelmap-test.c',
[ check_dep, libpulse_dep ] ],
- [ 'close-test', 'close-test.c',
- [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
[ 'core-util-test', 'core-util-test.c',
[ 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',
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
[ 'hashmap-test', 'hashmap-test.c',
[ 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',
[ 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',
[ 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',
- [ 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 ] ],
+ [ check_dep, libpulse_dep, libpulsecommon_dep ] ],
[ 'thread-mainloop-test', 'thread-mainloop-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 ] ],
[ '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 host_machine.system() != 'windows'
+if get_option('daemon')
default_tests += [
- [ 'sigbus-test', 'sigbus-test.c',
+ [ 'asyncmsgq-test', 'asyncmsgq-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ '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 ] ],
- [ 'usergroup-test', 'usergroup-test.c',
+ [ '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 ] ],
]
-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 ] ],
- ]
+ if host_machine.system() != 'windows'
+ default_tests += [
+ [ 'sigbus-test', 'sigbus-test.c',
+ [ 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
if cc.has_header('sys/eventfd.h')
@@ -95,12 +105,14 @@ if cc.has_header('sys/eventfd.h')
]
endif
-if alsa_dep.found()
- default_tests += [
- [ 'alsa-mixer-path-test', 'alsa-mixer-path-test.c',
- [ alsa_dep, check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ],
- libalsa_util ]
- ]
+if get_option('daemon')
+ if alsa_dep.found()
+ default_tests += [
+ [ 'alsa-mixer-path-test', 'alsa-mixer-path-test.c',
+ [ alsa_dep, check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ],
+ libalsa_util ]
+ ]
+ endif
endif
if glib_dep.found()
@@ -112,52 +124,59 @@ if glib_dep.found()
endif
# No-run 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 ] ],
+norun_tests += [
[ 'pacat-simple', 'pacat-simple.c',
[ libpulse_dep, libpulse_simple_dep ] ],
[ 'parec-simple', 'parec-simple.c',
[ 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
-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
+if get_option('daemon')
+ 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 ] ],
+ [ '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 ] ],
+ ]
-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' ] ]
-]
+ # 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
-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'] ],
+ [ '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
if cc.has_function('pthread_setaffinity_np', dependencies : thread_dep)
@@ -207,47 +226,51 @@ foreach t : default_tests + norun_tests
endif
endforeach
-# These tests need a running pulseaudio daemon
+if get_option('daemon')
-daemon_tests = [
- [ 'extended-test', 'extended-test.c',
- [ check_dep, libm_dep, libpulse_dep ] ],
- [ 'sync-playback', 'sync-playback.c',
- [ check_dep, libm_dep, libpulse_dep ] ],
-]
+ # These tests need a running pulseaudio daemon
-daemon_tests_long = [
- [ 'connect-stress', 'connect-stress.c',
- [ check_dep, libpulse_dep ] ],
- [ 'interpol-test', 'interpol-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
-]
+ daemon_tests = [
+ [ 'extended-test', 'extended-test.c',
+ [ check_dep, libm_dep, libpulse_dep ] ],
+ [ 'sync-playback', 'sync-playback.c',
+ [ check_dep, libm_dep, libpulse_dep ] ],
+ ]
-daemon_test_names = []
-daemon_test_long_names = []
+ daemon_tests_long = [
+ [ '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
- name = t[0]
- sources = t[1]
- deps = t[2]
+ daemon_test_names = []
+ daemon_test_long_names = []
- if daemon_tests.contains(t)
- daemon_test_names += name
- else
- daemon_test_long_names += name
- endif
+ foreach t : daemon_tests + daemon_tests_long
+ name = t[0]
+ sources = t[1]
+ deps = t[2]
- executable(name, sources,
- c_args : pa_c_args,
- include_directories : [ configinc, topinc ],
- dependencies : deps,
+ if daemon_tests.contains(t)
+ daemon_test_names += name
+ else
+ 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')
-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
-)
+endif
=====================================
src/tests/proplist-modargs-test.c
=====================================
@@ -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;
+}
=====================================
src/tests/proplist-test.c
=====================================
@@ -25,16 +25,13 @@
#include <pulse/proplist.h>
#include <pulse/xmalloc.h>
-#include <pulsecore/macro.h>
+#include <pulsecore/log.h>
#include <pulsecore/core-util.h>
-#include <pulsecore/modargs.h>
START_TEST (proplist_test) {
- pa_modargs *ma;
pa_proplist *a, *b, *c, *d;
char *s, *t, *u, *v;
const char *text;
- const char *x[] = { "foo", NULL };
a = pa_proplist_new();
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_log_debug("%s", 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
=====================================
src/utils/meson.build
=====================================
@@ -42,34 +42,36 @@ executable('pactl',
c_args : pa_c_args,
)
-if host_machine.system() != 'windows'
- pasuspender_sources = [
- 'pasuspender.c',
- ]
-
- executable('pasuspender',
- pasuspender_sources,
- install: true,
- install_rpath : privlibdir,
- include_directories : [configinc, topinc],
- link_with : [libpulsecommon, libpulse],
- dependencies: [libintl_dep],
- c_args : pa_c_args,
- )
-
- pacmd_sources = [
- 'pacmd.c',
- ]
-
- executable('pacmd',
- pacmd_sources,
- install: true,
- install_rpath : privlibdir,
- include_directories : [configinc, topinc],
- link_with : [libpulsecommon, libpulse],
- dependencies: [libintl_dep],
- c_args : pa_c_args,
- )
+if get_option('daemon')
+ if host_machine.system() != 'windows'
+ pasuspender_sources = [
+ 'pasuspender.c',
+ ]
+
+ executable('pasuspender',
+ pasuspender_sources,
+ install: true,
+ install_rpath : privlibdir,
+ include_directories : [configinc, topinc],
+ link_with : [libpulsecommon, libpulse],
+ dependencies: [libintl_dep],
+ c_args : pa_c_args,
+ )
+
+ pacmd_sources = [
+ 'pacmd.c',
+ ]
+
+ executable('pacmd',
+ pacmd_sources,
+ install: true,
+ install_rpath : privlibdir,
+ include_directories : [configinc, topinc],
+ link_with : [libpulsecommon, libpulse],
+ dependencies: [libintl_dep],
+ c_args : pa_c_args,
+ )
+ endif
endif
if x11_dep.found()
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/1a73fb9eb9851d00e2907a3dbd50d8dfb5e173b2...f760143c2238cc6d0efbc76ab64786d7bf481645
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/1a73fb9eb9851d00e2907a3dbd50d8dfb5e173b2...f760143c2238cc6d0efbc76ab64786d7bf481645
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20210419/0a0dadc2/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list