summaryrefslogtreecommitdiff
path: root/run_single_test.py
diff options
context:
space:
mode:
authorAndrew McNulty <amcn102@gmail.com>2024-09-21 11:27:05 +0200
committerDylan Baker <dylan@pnwbakers.com>2024-09-23 09:17:49 -0700
commit191b801f1d8524d20fa134ab23c6c7080f29c126 (patch)
treedd06dd5585e935c14191a3dda795d8baa03d5cd1 /run_single_test.py
parentbc30d5982d4f1e7650340bd189e1bb820ec2d7a8 (diff)
downloadmeson-191b801f1d8524d20fa134ab23c6c7080f29c126.tar.gz
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.
Diffstat (limited to 'run_single_test.py')
-rwxr-xr-xrun_single_test.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/run_single_test.py b/run_single_test.py
index 0b4750b76..6cc75ac17 100755
--- a/run_single_test.py
+++ b/run_single_test.py
@@ -16,6 +16,7 @@ from mesonbuild import mlog
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 main() -> None:
mlog.log(cmd_res)
mlog.log(result.stde)
+ clear_transitive_files()
exit(1 if failed else 0)
if __name__ == "__main__":