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

Volodymyr Sapsai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 17 12:37:30 PDT 2018


vsapsai created this revision.
vsapsai added reviewers: cmatthews, kristof.beyls, MatzeB.
Herald added a subscriber: dexonsmith.

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.


https://reviews.llvm.org/D50916

Files:
  lnt/tests/test_suite.py


Index: lnt/tests/test_suite.py
===================================================================
--- lnt/tests/test_suite.py
+++ lnt/tests/test_suite.py
@@ -214,12 +214,15 @@
         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):


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50916.161297.patch
Type: text/x-patch
Size: 890 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180817/d50ee2b1/attachment.bin>


More information about the llvm-commits mailing list