From d2b2ad32b76989b68e7b525e7484e25b0f0cc4e6 Mon Sep 17 00:00:00 2001 From: James Henderson Date: Fri, 7 May 2021 09:20:50 +0100 Subject: [PATCH] [lit][test] Attempt fix when paths include symlink Example of failure: https://lab.llvm.org/staging/#/builders/126/builds/345/steps/5/logs/FAIL__lit___use-tool-search-env_py --- llvm/utils/lit/tests/Inputs/use-tool-search-env/lit.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/utils/lit/tests/Inputs/use-tool-search-env/lit.cfg b/llvm/utils/lit/tests/Inputs/use-tool-search-env/lit.cfg index 7e61bb32aafa..a64d3f7ee338 100644 --- a/llvm/utils/lit/tests/Inputs/use-tool-search-env/lit.cfg +++ b/llvm/utils/lit/tests/Inputs/use-tool-search-env/lit.cfg @@ -7,5 +7,6 @@ config.test_exec_root = None import lit.llvm lit.llvm.initialize(lit_config, config) import os.path -lit.llvm.llvm_config.with_environment('TOOL_LOCATION', os.path.dirname(__file__) + '/test.tool') +path = os.path.realpath(os.path.join(os.path.dirname(__file__), 'test.tool')) +lit.llvm.llvm_config.with_environment('TOOL_LOCATION', path) lit.llvm.llvm_config.use_llvm_tool('test-tool', search_env='TOOL_LOCATION')