meson: guard the class-import test on the file's existence

test/test_import.py is referenced but not committed on all branches,
which makes meson configure abort on Windows with
ERROR: File test/test_import.py does not exist. Wire the test only
when the file is present.
This commit is contained in:
Abhi committed 2026-10-18 11:45:15 +05:30
1 parent 4a35664331
commit c2f219c95a
1 file changed
+4 -1
+4 -1
View File
@@ -115,8 +115,11 @@ if build_plugins
install_dir: r2_plugindir,
)
# test_import.py is not always present (it is not committed yet on every
# branch); only wire the test when the file exists
fs = import('fs')
python = find_program('python3', required: false)
if python.found()
if python.found() and fs.exists('test' / 'test_import.py')
test('r2unity-class-import', python,
args: [files('test/test_import.py'), core_plugin],
)