test: add tests validating all json conf files

This commit is contained in:
Pauli Virtanen 2024-03-26 18:08:52 +02:00 committed by Wim Taymans
parent 6bdeeb5881
commit 04c5d3958b
7 changed files with 15 additions and 8 deletions

View File

@ -6,6 +6,6 @@ executable('spa-monitor', 'spa-monitor.c',
dependencies : [ spa_dep, dl_lib ],
install : true)
executable('spa-json-dump', 'spa-json-dump.c',
spa_json_dump_exe = executable('spa-json-dump', 'spa-json-dump.c',
dependencies : [ spa_dep, dl_lib, ],
install : true)

View File

@ -3,9 +3,10 @@ conf_files = [
]
foreach c : conf_files
configure_file(input : '@0@.in'.format(c),
res = configure_file(input : '@0@.in'.format(c),
output : c,
configuration : conf_config,
install_dir : pipewire_confdatadir / 'client-rt.conf.avail')
test(f'validate-json-client-rt-@c@', spa_json_dump_exe, args : res)
endforeach

View File

@ -3,9 +3,10 @@ conf_files = [
]
foreach c : conf_files
configure_file(input : '@0@.in'.format(c),
res = configure_file(input : '@0@.in'.format(c),
output : c,
configuration : conf_config,
install_dir : pipewire_confdatadir / 'client.conf.avail')
test(f'validate-json-client-@c@', spa_json_dump_exe, args : res)
endforeach

View File

@ -12,8 +12,9 @@ conf_files = [
]
foreach c : conf_files
configure_file(input : c.get(0),
res = configure_file(input : c.get(0),
output : c.get(1),
configuration : conf_config,
install_dir : pipewire_confdatadir / 'filter-chain')
test('validate-json-filter-chain-' + c.get(0), spa_json_dump_exe, args : res)
endforeach

View File

@ -80,15 +80,17 @@ if build_vk
endif
foreach c : conf_files
configure_file(input : '@0@.in'.format(c),
res = configure_file(input : '@0@.in'.format(c),
output : c,
configuration : conf_config,
install_dir : pipewire_confdatadir)
test(f'validate-json-@c@', spa_json_dump_exe, args : res)
endforeach
configure_file(input : 'pipewire.conf.in',
res = configure_file(input : 'pipewire.conf.in',
output : 'pipewire-uninstalled.conf',
configuration : conf_config_uninstalled)
test('validate-json-pipewire-uninstalled.conf', spa_json_dump_exe, args : res)
conf_avail_folders = [
'pipewire.conf.avail',

View File

@ -3,9 +3,10 @@ conf_files = [
]
foreach c : conf_files
configure_file(input : '@0@.in'.format(c),
res = configure_file(input : '@0@.in'.format(c),
output : c,
configuration : conf_config,
install_dir : pipewire_confdatadir / 'pipewire-pulse.conf.avail')
test(f'validate-json-pulse-@c@', spa_json_dump_exe, args : res)
endforeach

View File

@ -4,9 +4,10 @@ conf_files = [
]
foreach c : conf_files
configure_file(input : '@0@.in'.format(c),
res = configure_file(input : '@0@.in'.format(c),
output : c,
configuration : conf_config,
install_dir : pipewire_confdatadir / 'pipewire.conf.avail')
test(f'validate-json-pipewire-@c@', spa_json_dump_exe, args : res)
endforeach