[LNT] r340107 - [LNT] In command-line tool allow to use relative path for test suite location.

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


Author: vsapsai
Date: Fri Aug 17 15:46:28 2018
New Revision: 340107

URL: http://llvm.org/viewvc/llvm-project?rev=340107&view=rev
Log:
[LNT] In command-line tool allow to use relative path for test suite location.

When test command `test-suite` is executed, it runs inside the sandbox and uses
test suite path as-is. So the path relative to the working directory is not
found when it is relative to the sandbox directory. Fix by converting relative
path to absolute path.

Test command `nt` works with relative paths correctly because it runs tests in
a different way.

Reviewers: cmatthews, kristof.beyls, MatzeB

Reviewed By: cmatthews

Subscribers: dexonsmith, llvm-commits

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

Modified:
    lnt/trunk/lnt/tests/test_suite.py

Modified: lnt/trunk/lnt/tests/test_suite.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/tests/test_suite.py?rev=340107&r1=340106&r2=340107&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/test_suite.py (original)
+++ lnt/trunk/lnt/tests/test_suite.py Fri Aug 17 15:46:28 2018
@@ -214,12 +214,15 @@ class TestSuiteTest(BuiltinTest):
         if not os.path.exists(opts.test_suite_root):
             self._fatal("invalid --test-suite argument, does not exist: %r" % (
                 opts.test_suite_root))
+        opts.test_suite_root = os.path.abspath(opts.test_suite_root)
 
         if opts.test_suite_externals:
             if not os.path.exists(opts.test_suite_externals):
                 self._fatal(
                     "invalid --test-externals argument, does not exist: %r" % (
                         opts.test_suite_externals,))
+            opts.test_suite_externals = os.path.abspath(
+                opts.test_suite_externals)
 
         opts.cmake = resolve_command_path(opts.cmake)
         if not isexecfile(opts.cmake):




More information about the llvm-commits mailing list