endif
if want_tests != 'false'
- parse_hwdb_py = find_program('parse_hwdb.py')
test('parse-hwdb',
- parse_hwdb_py,
+ files('parse_hwdb.py'),
suite : 'dist',
args : [hwdb_files_test,
auto_suspend_rules],
userspace_c_args = []
userspace_c_ld_args = []
userspace_sources = []
-meson_build_sh = find_program('tools/meson-build.sh')
+meson_build_sh = files('tools/meson-build.sh')
want_tests = get_option('tests')
want_slow_tests = want_tests != 'false' and get_option('slow-tests')
#####################################################################
-check_efi_alignment_py = find_program('tools/check-efi-alignment.py')
+check_efi_alignment_py = files('tools/check-efi-alignment.py')
#####################################################################
#####################################################################
-check_version_history_py = find_program('tools/check-version-history.py')
-elf2efi_py = find_program('tools/elf2efi.py')
-export_dbus_interfaces_py = find_program('tools/dbus_exporter.py')
-generate_gperfs = find_program('tools/generate-gperfs.py')
-make_autosuspend_rules_py = find_program('tools/make-autosuspend-rules.py')
-make_directive_index_py = find_program('tools/make-directive-index.py')
-sync_docs_py = find_program('tools/sync-docs.py')
-make_man_index_py = find_program('tools/make-man-index.py')
-meson_render_jinja2 = find_program('tools/meson-render-jinja2.py')
-update_dbus_docs_py = find_program('tools/update-dbus-docs.py')
-update_hwdb_autosuspend_sh = find_program('tools/update-hwdb-autosuspend.sh')
-update_hwdb_sh = find_program('tools/update-hwdb.sh')
-update_man_rules_py = find_program('tools/update-man-rules.py')
-update_syscall_tables_sh = find_program('tools/update-syscall-tables.sh')
-xml_helper_py = find_program('tools/xml_helper.py')
+check_version_history_py = files('tools/check-version-history.py')
+elf2efi_py = files('tools/elf2efi.py')
+export_dbus_interfaces_py = files('tools/dbus_exporter.py')
+generate_gperfs = files('tools/generate-gperfs.py')
+make_autosuspend_rules_py = files('tools/make-autosuspend-rules.py')
+make_directive_index_py = files('tools/make-directive-index.py')
+sync_docs_py = files('tools/sync-docs.py')
+make_man_index_py = files('tools/make-man-index.py')
+meson_render_jinja2 = files('tools/meson-render-jinja2.py')
+update_dbus_docs_py = files('tools/update-dbus-docs.py')
+update_hwdb_autosuspend_sh = files('tools/update-hwdb-autosuspend.sh')
+update_hwdb_sh = files('tools/update-hwdb.sh')
+update_man_rules_py = files('tools/update-man-rules.py')
+update_syscall_tables_sh = files('tools/update-syscall-tables.sh')
+xml_helper_py = files('tools/xml_helper.py')
#####################################################################
#####################################################################
-check_help = find_program('tools/check-help.sh')
-check_version = find_program('tools/check-version.sh')
+check_help = files('tools/check-help.sh')
+check_version = files('tools/check-version.sh')
foreach exec : public_programs
name = fs.name(exec.full_path())
####################################################
- git_contrib_sh = find_program('tools/git-contrib.sh')
run_target(
'git-contrib',
- command : [git_contrib_sh])
+ command : files('tools/git-contrib.sh'))
####################################################
endforeach
endif
-check_api_docs_sh = find_program('tools/check-api-docs.sh')
run_target(
'check-api-docs',
depends : [man, libsystemd, libudev],
- command : [check_api_docs_sh, libsystemd.full_path(), libudev.full_path()])
+ command : [files('tools/check-api-docs.sh'),
+ libsystemd.full_path(),
+ libudev.full_path()])
alias_target('update-dbus-docs', update_dbus_docs)
alias_target('update-man-rules', update_man_rules)
command : [export_dbus_interfaces_py, '@OUTPUT@', dbus_programs])
endif
-meson_extract_unit_files = find_program('tools/meson-extract-unit-files.py')
custom_target(
output : 'installed-unit-files.txt',
capture : true,
install : want_tests != 'no' and install_tests,
install_dir : testdata_dir,
- command : [meson_extract_unit_files, meson.project_build_root()])
+ command : [files('tools/meson-extract-unit-files.py'),
+ meson.project_build_root()])
#####################################################################
############################################################
-check_filesystems = find_program('check-filesystems.sh')
r = run_command(
[
'env', '--chdir', meson.project_build_root(),
- check_filesystems, cpp, files('filesystems-gperf.gperf'),
+ files('check-filesystems.sh'),
+ cpp,
+ files('filesystems-gperf.gperf'),
system_include_args,
],
check: false,
output : 'filesystems-gperf.h',
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
-generate_filesystem_list = find_program('generate-filesystem-list.py')
filesystem_list_inc = custom_target(
input : 'filesystems-gperf.gperf',
output : 'filesystem-list.inc',
- command : [generate_filesystem_list,
+ command : [files('generate-filesystem-list.py'),
'@INPUT@'],
capture : true)
-generate_filesystem_switch_case_inc = find_program('generate-filesystem-switch-case.py')
filesystem_switch_case_inc = custom_target(
input : 'filesystems-gperf.gperf',
output : 'filesystem-switch-case.inc',
- command : [generate_filesystem_switch_case_inc,
+ command : [files('generate-filesystem-switch-case.py'),
'@INPUT@'],
capture : true)
efi_test_template = test_template + efitest_base
efi_fuzz_template = fuzz_template + efitest_base
-generate_hwids_section_py = find_program('generate-hwids-section.py')
-
if conf.get('ENABLE_UKIFY') == 1
test_hwids_section_c = custom_target(
input : ['hwids/device1.json', 'hwids/device2.json', 'hwids/device3.json', 'hwids/device4.json'],
output : 'test-hwids-section.c',
- command : [generate_hwids_section_py, meson.current_source_dir()/'hwids'],
+ command : [files('generate-hwids-section.py'),
+ meson.current_source_dir()/'hwids'],
capture : true,
build_by_default : want_tests != 'false')
else
syscall_lists += files('syscalls-@0@.txt'.format(arch))
endforeach
-generate_syscall_py = find_program('generate-syscall.py')
-
run_target(
'update-syscall-header',
- command : [generate_syscall_py, files('syscall.h')] + syscall_lists)
+ command : [files('generate-syscall.py'),
+ files('syscall.h'),
+ syscall_lists])
endif
endif
-test_kernel_install_sh = find_program('test-kernel-install.sh')
+test_kernel_install_sh = files('test-kernel-install.sh')
command : [sed, '-n', '-r', '-f', '@INPUT0@', '@INPUT1@'],
capture : true)
-generate_dns_type_gperf = find_program('generate-dns_type-gperf.py')
-
gperf_file = custom_target(
input : dns_type_list_txt,
output : 'dns_type-from-name.gperf',
- command : [generate_dns_type_gperf, 'dns_type', 'DNS_TYPE_', '@INPUT@'],
+ command : [files('generate-dns_type-gperf.py'),
+ 'dns_type',
+ 'DNS_TYPE_',
+ '@INPUT@'],
capture : true)
dns_type_from_name_inc = custom_target(
shared_sources += files('tests.c')
endif
-generate_syscall_list = find_program('generate-syscall-list.py')
syscall_list_inc = custom_target(
input : syscall_list_txt,
output : 'syscall-list.inc',
- command : [generate_syscall_list,
+ command : [files('generate-syscall-list.py'),
'@INPUT@'],
capture : true)
############################################################
-generate_sym_test_py = find_program('generate-sym-test.py')
+generate_sym_test_py = files('generate-sym-test.py')
test_libsystemd_sym_c = custom_target(
- input : [libsystemd_sym_path] + systemd_headers + libsystemd_sources,
+ input : [libsystemd_sym_path,
+ systemd_headers,
+ libsystemd_sources],
output : 'test-libsystemd-sym.c',
- command : [generate_sym_test_py, libsystemd_sym_path, libsystemd_dir_path] + systemd_headers,
+ command : [generate_sym_test_py,
+ libsystemd_sym_path,
+ libsystemd_dir_path,
+ systemd_headers],
capture : true,
build_by_default : want_tests != 'false')
test_libudev_sym_c = custom_target(
- input : [libudev_sym_path, libudev_h_path] + libudev_sources,
+ input : [libudev_sym_path,
+ libudev_h_path,
+ libudev_sources],
output : 'test-libudev-sym.c',
- command : [generate_sym_test_py, libudev_sym_path, libudev_dir_path, libudev_h_path],
+ command : [generate_sym_test_py,
+ libudev_sym_path,
+ libudev_dir_path,
+ libudev_h_path],
capture : true,
build_by_default : want_tests != 'false')
# SPDX-License-Identifier: LGPL-2.1-or-later
-generate_directives_py = find_program('generate-directives.py')
+generate_directives_py = files('generate-directives.py')
fuzz_regression_tests = {}
add_test_setup('integration')
add_test_setup('shell', env : {'TEST_SHELL' : '1'})
-integration_test_wrapper = find_program('integration-test-wrapper.py')
+integration_test_wrapper = files('integration-test-wrapper.py')
integration_tests = []
integration_test_template = {
'mkosi-args' : [],
############################################################
if want_tests != 'false' and conf.get('ENABLE_HWDB') == 1
- hwdb_test_sh = find_program('hwdb-test.sh')
exe = executables_by_name.get('systemd-hwdb')
test('hwdb-test',
- hwdb_test_sh,
+ files('hwdb-test.sh'),
suite : 'dist',
args : exe.full_path(),
depends : exe,
############################################################
if want_tests != 'false'
- test_systemctl_enable_sh = find_program('test-systemctl-enable.sh')
systemctl = executables_by_name.get('systemctl')
systemd_id128 = executables_by_name.get('systemd-id128')
test('test-systemctl-enable',
- test_systemctl_enable_sh,
+ files('test-systemctl-enable.sh'),
# https://github.com/mesonbuild/meson/issues/2681
args : [systemctl.full_path(),
systemd_id128.full_path()],
############################################################
if want_tests != 'false' and conf.get('HAVE_SYSV_COMPAT') == 1
- sysv_generator_test_py = find_program('sysv-generator-test.py')
exe = executables_by_name.get('systemd-sysv-generator')
test('sysv-generator-test',
- sysv_generator_test_py,
+ files('sysv-generator-test.py'),
depends : exe,
suite : 'sysv')
endif
############################################################
if want_tests != 'false' and conf.get('HAVE_BLKID') == 1
- test_bootctl_json_sh = find_program('test-bootctl-json.sh')
exe = executables_by_name.get('bootctl')
test('test-bootctl-json',
- test_bootctl_json_sh,
+ files('test-bootctl-json.sh'),
args : exe.full_path(),
depends : exe,
suite : 'boot')
############################################################
if want_tests != 'false' and conf.get('ENABLE_TMPFILES') == 1
- test_systemd_tmpfiles_py = find_program('test-systemd-tmpfiles.py')
+ test_systemd_tmpfiles_py = files('test-systemd-tmpfiles.py')
exe = executables_by_name.get('systemd-tmpfiles')
test('test-systemd-tmpfiles',
test_systemd_tmpfiles_py,
############################################################
-rule_syntax_check_py = find_program('rule-syntax-check.py')
if want_tests != 'false'
test('rule-syntax-check',
- rule_syntax_check_py,
+ files('rule-syntax-check.py'),
suite : 'dist',
args : all_rules)
############################################################
-test_fstab_generator_sh = find_program('test-fstab-generator.sh')
+test_fstab_generator_sh = files('test-fstab-generator.sh')
if want_tests != 'false'
exe = executables_by_name.get('systemd-fstab-generator')
test('test-fstab-generator',
suite : 'fstab')
endif
if install_tests
- install_data('test-fstab-generator.sh',
+ install_data(test_fstab_generator_sh,
install_mode : 'rwxr-xr-x',
install_dir : unittestsdir)
endif
############################################################
-test_network_generator_conversion_sh = find_program('test-network-generator-conversion.sh')
+test_network_generator_conversion_sh = files('test-network-generator-conversion.sh')
if want_tests != 'false'
exe = executables_by_name.get('systemd-network-generator')
test('test-network-generator-conversion',
suite : 'network')
endif
if install_tests
- install_data('test-network-generator-conversion.sh',
+ install_data(test_network_generator_conversion_sh,
install_mode : 'rwxr-xr-x',
install_dir : unittestsdir)
endif
rpm = find_program('rpm', required : false)
rpmspec = find_program('rpmspec', required : false)
-test_rpm_macros = find_program('test-rpm-macros.sh')
if rpm.found() and rpmspec.found()
if want_tests != 'false'
test('test-rpm-macros',
- test_rpm_macros,
+ files('test-rpm-macros.sh'),
suite : 'dist',
args : [meson.project_build_root()],
depends : rpm_depends)
############################################################
if want_tests != 'false' and conf.get('HAVE_DMI') == 1
- udev_dmi_memory_id_test = find_program('udev-dmi-memory-id-test.sh')
+ udev_dmi_memory_id_test = files('udev-dmi-memory-id-test.sh')
exe = executables_by_name.get('dmi_memory_id')
if git.found() and fs.is_dir(meson.project_source_root() / '.git')