diff options
author | Arsen Arsenović <arsen@aarsen.me> | 2023-08-18 14:24:15 +0200 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-09-13 21:44:40 -0400 |
commit | 56ef698426bb58b7ffd32b0711e064b54166e10f (patch) | |
tree | 9363c671ef731d87f7900cbe1cd98fde5bc867da /run_project_tests.py | |
parent | ef5931f12dc462a6fd3357e1d6d694429a7f330f (diff) | |
download | meson-56ef698426bb58b7ffd32b0711e064b54166e10f.zip meson-56ef698426bb58b7ffd32b0711e064b54166e10f.tar.gz meson-56ef698426bb58b7ffd32b0711e064b54166e10f.tar.bz2 |
run_project_tests: support checking for symlinks
Diffstat (limited to 'run_project_tests.py')
-rwxr-xr-x | run_project_tests.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/run_project_tests.py b/run_project_tests.py index 78fa89c..7413c68 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -199,7 +199,7 @@ class InstalledFile: return None if self.typ == 'python_bytecode': return p.parent / importlib.util.cache_from_source(p.name) - elif self.typ in {'file', 'dir'}: + elif self.typ in {'file', 'dir', 'link'}: return p elif self.typ == 'shared_lib': if env.machines.host.is_windows() or env.machines.host.is_cygwin(): @@ -263,6 +263,11 @@ class InstalledFile: if not abs_p.is_dir(): raise RuntimeError(f'{p} is not a directory') return [x.relative_to(installdir) for x in abs_p.rglob('*') if x.is_file() or x.is_symlink()] + elif self.typ == 'link': + abs_p = installdir / p + if not abs_p.is_symlink(): + raise RuntimeError(f'{p} is not a symlink') + return [p] else: return [p] |