labath created this revision.
labath added reviewers: vsk, JDevlieghere.
Herald added a project: LLDB.

This was added in 2018 (r339929), when we were still using the
hand-rolled test runner.

It does not seem to be relevant anymore. In fact as far as I can tell,
it's a big no-op now as the exclusive_test_subdir variable is never set.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74551

Files:
  lldb/packages/Python/lldbsuite/test/configuration.py
  lldb/packages/Python/lldbsuite/test/dotest.py


Index: lldb/packages/Python/lldbsuite/test/dotest.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/dotest.py
+++ lldb/packages/Python/lldbsuite/test/dotest.py
@@ -1051,15 +1051,7 @@
             "netbsd" in target_platform or
             "windows" in target_platform)
 
-    # Collect tests from the specified testing directories. If a test
-    # subdirectory filter is explicitly specified, limit the search to that
-    # subdirectory.
-    exclusive_test_subdir = 
configuration.get_absolute_path_to_exclusive_test_subdir()
-    if exclusive_test_subdir:
-        dirs_to_search = [exclusive_test_subdir]
-    else:
-        dirs_to_search = configuration.testdirs
-    for testdir in dirs_to_search:
+    for testdir in configuration.testdirs:
         for (dirpath, dirnames, filenames) in os.walk(testdir):
             visit('Test', dirpath, filenames)
 
Index: lldb/packages/Python/lldbsuite/test/configuration.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/configuration.py
+++ lldb/packages/Python/lldbsuite/test/configuration.py
@@ -117,11 +117,6 @@
 # The clang module cache directory used by clang.
 clang_module_cache_dir = None
 
-# The only directory to scan for tests. If multiple test directories are
-# specified, and an exclusive test subdirectory is specified, the latter option
-# takes precedence.
-exclusive_test_subdir = None
-
 # Test results handling globals
 results_filename = None
 results_formatter_name = None
@@ -153,37 +148,6 @@
     return False
 
 
-def get_absolute_path_to_exclusive_test_subdir():
-    """
-    If an exclusive test subdirectory is specified, return its absolute path.
-    Otherwise return None.
-    """
-    test_directory = os.path.dirname(os.path.realpath(__file__))
-
-    if not exclusive_test_subdir:
-        return
-
-    if len(exclusive_test_subdir) > 0:
-        test_subdir = os.path.join(test_directory, exclusive_test_subdir)
-        if os.path.isdir(test_subdir):
-            return test_subdir
-
-        print('specified test subdirectory {} is not a valid directory\n'
-                .format(test_subdir))
-
-
-def get_absolute_path_to_root_test_dir():
-    """
-    If an exclusive test subdirectory is specified, return its absolute path.
-    Otherwise, return the absolute path of the root test directory.
-    """
-    test_subdir = get_absolute_path_to_exclusive_test_subdir()
-    if test_subdir:
-        return test_subdir
-
-    return os.path.dirname(os.path.realpath(__file__))
-
-
 def get_filecheck_path():
     """
     Get the path to the FileCheck testing tool.


Index: lldb/packages/Python/lldbsuite/test/dotest.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/dotest.py
+++ lldb/packages/Python/lldbsuite/test/dotest.py
@@ -1051,15 +1051,7 @@
             "netbsd" in target_platform or
             "windows" in target_platform)
 
-    # Collect tests from the specified testing directories. If a test
-    # subdirectory filter is explicitly specified, limit the search to that
-    # subdirectory.
-    exclusive_test_subdir = configuration.get_absolute_path_to_exclusive_test_subdir()
-    if exclusive_test_subdir:
-        dirs_to_search = [exclusive_test_subdir]
-    else:
-        dirs_to_search = configuration.testdirs
-    for testdir in dirs_to_search:
+    for testdir in configuration.testdirs:
         for (dirpath, dirnames, filenames) in os.walk(testdir):
             visit('Test', dirpath, filenames)
 
Index: lldb/packages/Python/lldbsuite/test/configuration.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/configuration.py
+++ lldb/packages/Python/lldbsuite/test/configuration.py
@@ -117,11 +117,6 @@
 # The clang module cache directory used by clang.
 clang_module_cache_dir = None
 
-# The only directory to scan for tests. If multiple test directories are
-# specified, and an exclusive test subdirectory is specified, the latter option
-# takes precedence.
-exclusive_test_subdir = None
-
 # Test results handling globals
 results_filename = None
 results_formatter_name = None
@@ -153,37 +148,6 @@
     return False
 
 
-def get_absolute_path_to_exclusive_test_subdir():
-    """
-    If an exclusive test subdirectory is specified, return its absolute path.
-    Otherwise return None.
-    """
-    test_directory = os.path.dirname(os.path.realpath(__file__))
-
-    if not exclusive_test_subdir:
-        return
-
-    if len(exclusive_test_subdir) > 0:
-        test_subdir = os.path.join(test_directory, exclusive_test_subdir)
-        if os.path.isdir(test_subdir):
-            return test_subdir
-
-        print('specified test subdirectory {} is not a valid directory\n'
-                .format(test_subdir))
-
-
-def get_absolute_path_to_root_test_dir():
-    """
-    If an exclusive test subdirectory is specified, return its absolute path.
-    Otherwise, return the absolute path of the root test directory.
-    """
-    test_subdir = get_absolute_path_to_exclusive_test_subdir()
-    if test_subdir:
-        return test_subdir
-
-    return os.path.dirname(os.path.realpath(__file__))
-
-
 def get_filecheck_path():
     """
     Get the path to the FileCheck testing tool.
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to