From 191b801f1d8524d20fa134ab23c6c7080f29c126 Mon Sep 17 00:00:00 2001 From: Andrew McNulty Date: Sat, 21 Sep 2024 11:27:05 +0200 Subject: [PATCH] run_single_test: Ensure symlinks exist and are cleaned up The common test case "268 install functions and follow symlinks" requires that certain symlinks exist in order to function. If one clones a fresh repo and executes run_single_test.py with the aforementioned test as the target it will fail as the required symlinks are not part of the repo. Normally these symlinks are created and cleaned up when the overall testsuite is run but this is not the case for run_single_test.py This commit calls the necessary creation and cleanup functions in the case of run_single_test.py. --- run_single_test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/run_single_test.py b/run_single_test.py index 0b4750b76d1b..6cc75ac17b4e 100755 --- a/run_single_test.py +++ b/run_single_test.py @@ -16,6 +16,7 @@ from run_tests import handle_meson_skip_test from run_project_tests import TestDef, load_test_json, run_test, BuildStep from run_project_tests import setup_commands, detect_system_compiler, detect_tools +from run_project_tests import setup_symlinks, clear_transitive_files if T.TYPE_CHECKING: from run_project_tests import CompilerArgumentType @@ -44,6 +45,7 @@ def main() -> None: parser.add_argument('--quick', action='store_true', help='Skip some compiler and tool checking') args = T.cast('ArgumentType', parser.parse_args()) + setup_symlinks() setup_commands(args.backend) if not args.quick: detect_system_compiler(args) @@ -95,6 +97,7 @@ def should_fail(path: pathlib.Path) -> str: mlog.log(cmd_res) mlog.log(result.stde) + clear_transitive_files() exit(1 if failed else 0) if __name__ == "__main__":