Skip to content

Conversation

@charles-zablit
Copy link
Contributor

This patch adds a check in lldb's API test CMakeLists file to ensure that dirname is in the PATH, which is not obvious on Windows.

@llvmbot
Copy link
Member

llvmbot commented Oct 21, 2025

@llvm/pr-subscribers-lldb

Author: Charles Zablit (charles-zablit)

Changes

This patch adds a check in lldb's API test CMakeLists file to ensure that dirname is in the PATH, which is not obvious on Windows.


Full diff: https://github.com/llvm/llvm-project/pull/164494.diff

1 Files Affected:

  • (modified) lldb/test/API/CMakeLists.txt (+9)
diff --git a/lldb/test/API/CMakeLists.txt b/lldb/test/API/CMakeLists.txt
index b1ace6296f46a..df2648d3c3518 100644
--- a/lldb/test/API/CMakeLists.txt
+++ b/lldb/test/API/CMakeLists.txt
@@ -74,6 +74,15 @@ else()
   endif()
 endif()
 
+find_program(LLDB_DIRNAME_PATH dirname)
+if(LLDB_DIRNAME_PATH)
+  message(STATUS "Found dirname: ${LLDB_DIRNAME_PATH}")
+else()
+  message(STATUS "Did not find 'dirname'.")
+  message(WARNING
+        "Many LLDB API tests require the 'dirname' tool. Please provide it in Path.")
+endif()
+
 if (TARGET clang)
   set(LLDB_DEFAULT_TEST_COMPILER "${LLVM_TOOLS_BINARY_DIR}/clang${CMAKE_EXECUTABLE_SUFFIX}")
 else()

@charles-zablit charles-zablit self-assigned this Oct 21, 2025
Comment on lines 82 to 83
message(WARNING
"Many LLDB API tests require the 'dirname' tool. Please provide it in Path.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This warning message could be more generic and mention that tests require the coreutils.

Copy link
Contributor

@Nerixyz Nerixyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@Nerixyz Nerixyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong button, but LGTM

@charles-zablit charles-zablit merged commit 1128d3b into llvm:main Oct 22, 2025
10 checks passed
charles-zablit added a commit to charles-zablit/llvm-project that referenced this pull request Oct 22, 2025
This patch adds a check in lldb's API test CMakeLists file to ensure
that `dirname` is in the PATH, which is not obvious on Windows.

---------

Co-authored-by: nerix <[email protected]>
dvbuka pushed a commit to dvbuka/llvm-project that referenced this pull request Oct 27, 2025
This patch adds a check in lldb's API test CMakeLists file to ensure
that `dirname` is in the PATH, which is not obvious on Windows.

---------

Co-authored-by: nerix <[email protected]>
Lukacma pushed a commit to Lukacma/llvm-project that referenced this pull request Oct 29, 2025
This patch adds a check in lldb's API test CMakeLists file to ensure
that `dirname` is in the PATH, which is not obvious on Windows.

---------

Co-authored-by: nerix <[email protected]>
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
This patch adds a check in lldb's API test CMakeLists file to ensure
that `dirname` is in the PATH, which is not obvious on Windows.

---------

Co-authored-by: nerix <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants