1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

meson: Use fs module in more places

This commit is contained in:
Jan Janssen 2023-06-14 16:05:52 +02:00
parent 14941724ec
commit 739a62bb40
5 changed files with 6 additions and 8 deletions

View File

@ -4699,7 +4699,7 @@ check_help = find_program('tools/check-help.sh')
check_version = find_program('tools/check-version.sh')
foreach exec : public_programs
name = exec.full_path().split('/')[-1]
name = fs.name(exec.full_path())
if want_tests != 'false'
test('check-help-' + name,
check_help,

View File

@ -84,7 +84,7 @@ endif
foreach header : _systemd_headers + _not_installed_headers + [libudev_h_path]
foreach opt : opts
std_name = opt.length() == 2 ? '_'.join(opt[1].split(':')) : ''
test('cc-' + header.split('/')[-1] + '_' + opt[0] + std_name,
test('cc-' + fs.name(header) + '_' + opt[0] + std_name,
env,
suite : 'headers',
args : [cc.cmd_array(),

View File

@ -130,7 +130,7 @@ endif
udev_prog_paths = {}
foreach prog : udev_progs
name = prog[0].split('/')[0]
name = fs.stem(prog[0])
exe = executable(
name,

View File

@ -83,8 +83,8 @@ foreach p : out.stdout().split()
if p.contains('\\')
continue
endif
fuzzer = p.split('/')[-2]
fuzz_in = p.split('/')[-1]
fuzzer = fs.name(fs.parent(p))
fuzz_in = fs.name(p)
if fuzzer not in fuzz_regression_tests
fuzz_regression_tests += {fuzzer: []}
endif

View File

@ -155,9 +155,7 @@ if want_tests != 'false' and dmi_arches.contains(host_machine.cpu_family())
foreach p : out.stdout().split()
source = project_source_root / p
name = 'dmidecode_' + p.split('/')[-1].split('.')[0]
test(name,
test('dmidecode_' + fs.stem(p),
udev_dmi_memory_id_test,
suite : 'dist',
args : [udev_prog_paths['dmi_memory_id'].full_path(),