[LNT] r340106 - [LNT] In command-line tool expand tilde when resolving commands.

Volodymyr Sapsai via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 17 15:38:42 PDT 2018


Author: vsapsai
Date: Fri Aug 17 15:38:42 2018
New Revision: 340106

URL: http://llvm.org/viewvc/llvm-project?rev=340106&view=rev
Log:
[LNT] In command-line tool expand tilde when resolving commands.

The use case it addresses is being able to provide extra tools like

    --use-lit=~/llvm/build/bin/llvm-lit

Currently lnt fails even if the file is present and executable. Error looks like

> lnt error: LIT tool not found (looked for ~/llvm/build/bin/llvm-lit)

Reviewers: cmatthews, kristof.beyls

Reviewed By: cmatthews

Subscribers: dexonsmith, llvm-commits

Differential Revision: https://reviews.llvm.org/D50915

Modified:
    lnt/trunk/lnt/testing/util/commands.py

Modified: lnt/trunk/lnt/testing/util/commands.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/testing/util/commands.py?rev=340106&r1=340105&r2=340106&view=diff
==============================================================================
--- lnt/trunk/lnt/testing/util/commands.py (original)
+++ lnt/trunk/lnt/testing/util/commands.py Fri Aug 17 15:38:42 2018
@@ -114,6 +114,8 @@ def resolve_command_path(name):
     executable.
 
     """
+    name = os.path.expanduser(name)
+
     # If the given name exists (or is a path), make it absolute.
     if os.path.exists(name):
         return os.path.abspath(name)




More information about the llvm-commits mailing list