meson: Drop project_source_root and project_build_root variables

We can now rely on meson.project_source_root() and meson.project_build_root()
which do the same thing.
This commit is contained in:
Daan De Meyer
2025-03-26 14:45:34 +01:00
parent d22ffb44c1
commit b4b1d94a09
7 changed files with 31 additions and 35 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ integration_tests += [
'luks.options=0d318174-56b0-4d6e-a324-ac1e7e7d235d=x-initrd.attach',
],
'qemu-args' : [
'-drive', 'id=keydev,if=none,format=raw,cache=unsafe,file=@0@'.format(project_build_root / 'mkosi.output/keydev.raw'),
'-drive', 'id=keydev,if=none,format=raw,cache=unsafe,file=@0@'.format(meson.project_build_root() / 'mkosi.output/keydev.raw'),
'-device', 'scsi-hd,drive=keydev,serial=keydev',
],
'mkosi-args' : integration_test_template['mkosi-args'] + [
+4 -4
View File
@@ -55,7 +55,7 @@ sanitize_address_undefined = custom_target(
'sanitize-address-undefined-fuzzers',
output : 'sanitize-address-undefined-fuzzers',
command : [meson_build_sh,
project_source_root,
meson.project_source_root(),
'@OUTPUT@',
'fuzzers',
' '.join(fuzz_c_args + '-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION'),
@@ -71,13 +71,13 @@ sanitize_address_undefined = custom_target(
fuzz_sanitizers = [['address,undefined', sanitize_address_undefined]]
fuzz_testsdir = 'test/fuzz'
if git.found() and fs.is_dir(project_source_root / '.git')
if git.found() and fs.is_dir(meson.project_source_root() / '.git')
out = run_command(env, '-u', 'GIT_WORK_TREE',
git, '--git-dir=@0@/.git'.format(project_source_root),
git, '--git-dir=@0@/.git'.format(meson.project_source_root()),
'ls-files', ':/@0@/*/*'.format(fuzz_testsdir),
check: true)
else
out = run_command(sh, '-c', 'cd "@0@"; echo @1@/*/*'.format(project_source_root, fuzz_testsdir), check: true)
out = run_command(sh, '-c', 'cd "@0@"; echo @1@/*/*'.format(meson.project_source_root(), fuzz_testsdir), check: true)
endif
# Add crafted fuzz inputs we have in the repo
+5 -5
View File
@@ -220,7 +220,7 @@ if rpm.found() and rpmspec.found()
test('test-rpm-macros',
test_rpm_macros,
suite : 'dist',
args : [project_build_root])
args : [meson.project_build_root()])
endif
else
message('Skipping test-rpm-macros since rpm and/or rpmspec are not available')
@@ -232,20 +232,20 @@ if want_tests != 'false' and conf.get('HAVE_DMI') == 1
udev_dmi_memory_id_test = find_program('udev-dmi-memory-id-test.sh')
exe = executables_by_name.get('dmi_memory_id')
if git.found() and fs.is_dir(project_source_root / '.git')
if git.found() and fs.is_dir(meson.project_source_root() / '.git')
out = run_command(
env, '-u', 'GIT_WORK_TREE',
git, '--git-dir=@0@/.git'.format(project_source_root),
git, '--git-dir=@0@/.git'.format(meson.project_source_root()),
'ls-files', ':/test/dmidecode-dumps/*.bin',
check: true)
else
out = run_command(
sh, '-c', 'cd "$1"; echo test/dmidecode-dumps/*.bin', '_', project_source_root,
sh, '-c', 'cd "$1"; echo test/dmidecode-dumps/*.bin', '_', meson.project_source_root(),
check: true)
endif
foreach p : out.stdout().split()
source = project_source_root / p
source = meson.project_source_root() / p
test('dmidecode_' + fs.stem(p),
udev_dmi_memory_id_test,
suite : 'udev',