Author: Leonard Grey
Date: 2026-06-16T11:24:50-04:00
New Revision: b6f0fb6c242369844acba6a8fd21072a718a75b5

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

LOG: [lldb] Remove .noindex suffix from test output directory for non-Darwin 
(#197237)

.noindex is only needed for macOS Spotlight. Given that some platforms
limit path length, there's a benefit to omitting it except for Darwin.

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/dotest_args.py
    lldb/test/API/sanity/TestModuleCacheSanity.py
    lldb/test/CMakeLists.txt
    lldb/test/Shell/Settings/TestModuleCacheSanity.test

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/dotest_args.py 
b/lldb/packages/Python/lldbsuite/test/dotest_args.py
index 8995fe57e93a0..70123723e225a 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest_args.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest_args.py
@@ -243,7 +243,9 @@ def create_parser():
         "--build-dir",
         dest="test_build_dir",
         metavar="Test build directory",
-        default="lldb-test-build.noindex",
+        default=(
+            "lldb-test-build.noindex" if sys.platform == "darwin" else 
"lldb-test-build"
+        ),
         help="The root build directory for the tests. It will be removed 
before running.",
     )
     group.add_argument(

diff  --git a/lldb/test/API/sanity/TestModuleCacheSanity.py 
b/lldb/test/API/sanity/TestModuleCacheSanity.py
index 1d3a6b3158898..41602c48226b5 100644
--- a/lldb/test/API/sanity/TestModuleCacheSanity.py
+++ b/lldb/test/API/sanity/TestModuleCacheSanity.py
@@ -15,5 +15,5 @@ class ModuleCacheSanityTestCase(TestBase):
     def test(self):
         self.expect(
             "settings show symbols.clang-modules-cache-path",
-            substrs=["lldb-test-build.noindex", "module-cache-lldb"],
+            substrs=["lldb-test-build", "module-cache-lldb"],
         )

diff  --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt
index 0b01936c2590b..a0796c4cd1eaf 100644
--- a/lldb/test/CMakeLists.txt
+++ b/lldb/test/CMakeLists.txt
@@ -42,12 +42,16 @@ if(LLDB_BUILT_STANDALONE)
 endif()
 
 # Configure the build directory.
-# The .noindex suffix is a marker for Spotlight to never index the
-# build directory.  LLDB queries Spotlight to locate .dSYM bundles
-# based on the UUID embedded in a binary, and because the UUID is a
-# hash of filename and .text section, there *will* be conflicts inside
-# the build directory.
-set(LLDB_TEST_BUILD_DIRECTORY "${PROJECT_BINARY_DIR}/lldb-test-build.noindex" 
CACHE PATH "The build root for building tests.")
+if(APPLE)
+  # The .noindex suffix is a marker for Spotlight to never index the
+  # build directory.  LLDB queries Spotlight to locate .dSYM bundles
+  # based on the UUID embedded in a binary, and because the UUID is a
+  # hash of filename and .text section, there *will* be conflicts inside
+  # the build directory.
+  set(LLDB_TEST_BUILD_DIRECTORY 
"${PROJECT_BINARY_DIR}/lldb-test-build.noindex" CACHE PATH "The build root for 
building tests.")
+else()
+  set(LLDB_TEST_BUILD_DIRECTORY "${PROJECT_BINARY_DIR}/lldb-test-build" CACHE 
PATH "The build root for building tests.")
+endif()
 
 # Configure and create module cache directories.
 set(LLDB_TEST_MODULE_CACHE_LLDB 
"${LLDB_TEST_BUILD_DIRECTORY}/module-cache-lldb" CACHE PATH "The Clang module 
cache used by the Clang embedded in LLDB while running tests.")

diff  --git a/lldb/test/Shell/Settings/TestModuleCacheSanity.test 
b/lldb/test/Shell/Settings/TestModuleCacheSanity.test
index f16f40d47a6bf..e39a3d7bd692f 100644
--- a/lldb/test/Shell/Settings/TestModuleCacheSanity.test
+++ b/lldb/test/Shell/Settings/TestModuleCacheSanity.test
@@ -1,4 +1,4 @@
 # This is a sanity check that verifies that the module cache path is set
 # correctly and points inside the default test build directory.
 RUN: %lldb -o 'settings show symbols.clang-modules-cache-path' | FileCheck  %s
-CHECK: lldb-test-build.noindex{{.*}}module-cache-lldb
+CHECK: lldb-test-build{{.*}}module-cache-lldb


        
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to