[LNT] r317619 - runtest/test_suite. Transform cmake caches to absolute paths

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 7 13:27:09 PST 2017


Author: matze
Date: Tue Nov  7 13:27:09 2017
New Revision: 317619

URL: http://llvm.org/viewvc/llvm-project?rev=317619&view=rev
Log:
runtest/test_suite. Transform cmake caches to absolute paths

Users expect caches to be relative to CWD when inoking lnt runtest.
However the cmake invocation happens in the build directory. Switch
cache paths to absolute paths to avoid problems.

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=317619&r1=317618&r2=317619&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/test_suite.py (original)
+++ lnt/trunk/lnt/tests/test_suite.py Tue Nov  7 13:27:09 2017
@@ -495,10 +495,13 @@ class TestSuiteTest(BuiltinTest):
         # Prepare cmake cache if requested:
         cmake_flags = []
         for cache in self.opts.cmake_cache:
+            if cache == "":
+                continue
             # Shortcut for the common case.
             if not cache.endswith(".cmake") and "/" not in cache:
                 cache = os.path.join(self._test_suite_dir(),
                                      "cmake/caches", cache + ".cmake")
+            cache = os.path.abspath(cache)
             if not os.path.exists(cache):
                 fatal("Could not find CMake cache file: " + cache)
             cmake_flags += ['-C', cache]




More information about the llvm-commits mailing list