[llvm] d2b2ad3 - [lit][test] Attempt fix when paths include symlink

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Fri May 7 01:22:40 PDT 2021


Author: James Henderson
Date: 2021-05-07T09:21:58+01:00
New Revision: d2b2ad32b76989b68e7b525e7484e25b0f0cc4e6

URL: https://github.com/llvm/llvm-project/commit/d2b2ad32b76989b68e7b525e7484e25b0f0cc4e6
DIFF: https://github.com/llvm/llvm-project/commit/d2b2ad32b76989b68e7b525e7484e25b0f0cc4e6.diff

LOG: [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

Added: 
    

Modified: 
    llvm/utils/lit/tests/Inputs/use-tool-search-env/lit.cfg

Removed: 
    


################################################################################
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 7e61bb32aafa2..a64d3f7ee3389 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')


        


More information about the llvm-commits mailing list