diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2023-11-06 18:30:00 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2023-11-07 21:52:14 +0200 |
| commit | 2ea284bac1dce5ac659aaaa68f4c36f6278ed340 (patch) | |
| tree | 0645cf1b3fb145d12222209b947c552dd1c53b6c /run_project_tests.py | |
| parent | 686963f1c247442e01787a276879391aa64e41c2 (diff) | |
| download | meson-2ea284bac1dce5ac659aaaa68f4c36f6278ed340.tar.gz | |
Prohibit symlinks in test data dir because they get mangled by setup.py.
Diffstat (limited to 'run_project_tests.py')
| -rwxr-xr-x | run_project_tests.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/run_project_tests.py b/run_project_tests.py index 7ff164086..39bf1628f 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -1561,6 +1561,14 @@ def print_tool_versions() -> None: print('{0:<{2}}: {1}'.format(tool.tool, get_version(tool), max_width)) print() +tmpdir = list(Path('.').glob('**/*install functions and follow symlinks')) +print(tmpdir) +assert(len(tmpdir) == 1) +symlink_test_dir = tmpdir[0] +symlink_file1 = symlink_test_dir / 'foo/link1' +symlink_file2 = symlink_test_dir / 'foo/link2.h' +del tmpdir + def clear_transitive_files() -> None: a = Path('test cases/common') for d in a.glob('*subproject subdir/subprojects/subsubsub*'): @@ -1568,6 +1576,18 @@ def clear_transitive_files() -> None: mesonlib.windows_proof_rmtree(str(d)) else: mesonlib.windows_proof_rm(str(d)) + try: + symlink_file1.unlink() + except FileNotFoundError: + pass + try: + symlink_file2.unlink() + except FileNotFoundError: + pass + +def setup_symlinks() -> None: + symlink_file1.symlink_to('file1') + symlink_file2.symlink_to('file1') if __name__ == '__main__': if under_ci and not raw_ci_jobname: @@ -1611,6 +1631,7 @@ if __name__ == '__main__': options.extra_args += ['--native-file', options.native_file] clear_transitive_files() + setup_symlinks() print('Meson build system', meson_version, 'Project Tests') print('Using python', sys.version.split('\n')[0], f'({sys.executable!r})') |
