[Lldb-commits] [lldb] 8248dd9 - [lldb] Fix test_exec_root of API tests

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 22 07:17:19 PDT 2021


Author: Pavel Labath
Date: 2021-03-22T15:15:48+01:00
New Revision: 8248dd91d7f042893d4a605e98d19cb1b89a44d4

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

LOG: [lldb] Fix test_exec_root of API tests

lit has grown a feature where it stores the runtimes of all tests.
Normally, these times should be stored in the build directory, but
because our API tests have set test_exec_root to point to the source
tree, it has ended up polluting our checkout and led to the
.lit_test_times.txt being committed to the repository.

Delete this file, and adjust the exec root of API tests. I've also
needed to adjust the root of Shell tests, in order to avoid the two
overlapping.

Added: 
    

Modified: 
    lldb/test/API/lit.cfg.py
    lldb/test/Shell/helper/toolchain.py
    lldb/test/Shell/lit.cfg.py

Removed: 
    lldb/test/API/.lit_test_times.txt


################################################################################
diff  --git a/lldb/test/API/.lit_test_times.txt b/lldb/test/API/.lit_test_times.txt
deleted file mode 100644
index 5b848a0183c9..000000000000
--- a/lldb/test/API/.lit_test_times.txt
+++ /dev/null
@@ -1 +0,0 @@
-2.777875e+00 functionalities/load_lazy/TestLoadUsingLazyBind.py

diff  --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py
index 54a02453b174..cbb457e9328c 100644
--- a/lldb/test/API/lit.cfg.py
+++ b/lldb/test/API/lit.cfg.py
@@ -17,10 +17,10 @@
 config.suffixes = ['.py']
 
 # test_source_root: The root path where tests are located.
-# test_exec_root: The root path where tests should be run.
 config.test_source_root = os.path.dirname(__file__)
-config.test_exec_root = config.test_source_root
 
+# test_exec_root: The root path where tests should be run.
+config.test_exec_root = os.path.join(config.lldb_obj_root, 'test', 'API')
 
 def mkdir_p(path):
   import errno

diff  --git a/lldb/test/Shell/helper/toolchain.py b/lldb/test/Shell/helper/toolchain.py
index 59b078411c1c..6e564f31dbd3 100644
--- a/lldb/test/Shell/helper/toolchain.py
+++ b/lldb/test/Shell/helper/toolchain.py
@@ -11,7 +11,7 @@
 
 
 def _get_lldb_init_path(config):
-    return os.path.join(config.test_exec_root, 'Shell', 'lit-lldb-init')
+    return os.path.join(config.test_exec_root, 'lit-lldb-init')
 
 
 def _disallow(config, execName):

diff  --git a/lldb/test/Shell/lit.cfg.py b/lldb/test/Shell/lit.cfg.py
index 1e793846023a..c4730b284b23 100644
--- a/lldb/test/Shell/lit.cfg.py
+++ b/lldb/test/Shell/lit.cfg.py
@@ -36,7 +36,7 @@
 config.test_source_root = os.path.dirname(__file__)
 
 # test_exec_root: The root path where tests should be run.
-config.test_exec_root = os.path.join(config.lldb_obj_root, 'test')
+config.test_exec_root = os.path.join(config.lldb_obj_root, 'test', 'Shell')
 
 # Propagate environment vars.
 llvm_config.with_system_environment([


        


More information about the lldb-commits mailing list