From 2ea284bac1dce5ac659aaaa68f4c36f6278ed340 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 6 Nov 2023 18:30:00 +0200 Subject: Prohibit symlinks in test data dir because they get mangled by setup.py. --- run_format_tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) mode change 100644 => 100755 run_format_tests.py (limited to 'run_format_tests.py') diff --git a/run_format_tests.py b/run_format_tests.py old mode 100644 new mode 100755 index 70fa1212e..ca3e715f2 --- a/run_format_tests.py +++ b/run_format_tests.py @@ -75,9 +75,17 @@ def check_format() -> None: continue check_file(root / file) +def check_symlinks(): + for f in Path('test cases').glob('**/*'): + if f.is_symlink(): + if 'boost symlinks' in str(f): + continue + raise SystemExit(f'Test data dir contains symlink: {f}.') + if __name__ == '__main__': script_dir = os.path.split(__file__)[0] if script_dir != '': os.chdir(script_dir) check_format() + check_symlinks() -- cgit v1.2.3