Skip to content

[libc][test] Adjust header paths in tests #119623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 11, 2024
Merged

Conversation

Caslyn
Copy link
Contributor

@Caslyn Caslyn commented Dec 11, 2024

Since index_test.cpp and rindex_test.cpp now reside in /strings, adjust some header paths accordingly.

Link: #118899

Since `index_test.cpp` and `rindex_test.cpp` now reside in /strings,
adjust some header paths accordingly.
@Caslyn Caslyn added the libc label Dec 11, 2024
@Caslyn Caslyn self-assigned this Dec 11, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 11, 2024

@llvm/pr-subscribers-libc

Author: Caslyn Tonelli (Caslyn)

Changes

Since index_test.cpp and rindex_test.cpp now reside in /strings, adjust some header paths accordingly.


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

2 Files Affected:

  • (modified) libc/test/src/strings/index_test.cpp (+2-2)
  • (modified) libc/test/src/strings/rindex_test.cpp (+2-2)
diff --git a/libc/test/src/strings/index_test.cpp b/libc/test/src/strings/index_test.cpp
index 88953205009d76..fc4cd2b31c55d1 100644
--- a/libc/test/src/strings/index_test.cpp
+++ b/libc/test/src/strings/index_test.cpp
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "StrchrTest.h"
+#include "test/src/string/StrchrTest.h"
 
-#include "src/string/index.h"
+#include "src/strings/index.h"
 #include "test/UnitTest/Test.h"
 
 STRCHR_TEST(Index, LIBC_NAMESPACE::index)
diff --git a/libc/test/src/strings/rindex_test.cpp b/libc/test/src/strings/rindex_test.cpp
index 10513919cffa2d..d3b756fe5f6e52 100644
--- a/libc/test/src/strings/rindex_test.cpp
+++ b/libc/test/src/strings/rindex_test.cpp
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "StrchrTest.h"
+#include "test/src/string/StrchrTest.h"
 
-#include "src/string/rindex.h"
+#include "src/strings/rindex.h"
 #include "test/UnitTest/Test.h"
 
 STRRCHR_TEST(Rindex, LIBC_NAMESPACE::rindex)

Copy link
Member

@nickdesaulniers nickdesaulniers left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

Did you happen to spot this via a build breakage, per chance? I don't have any build breakages on my end, but that's making me think I should go investigate why that would be.

@nickdesaulniers
Copy link
Member

ninja libc-strings-tests doesn't appear to be building/running the index/rindex tests...uh oh

@nickdesaulniers
Copy link
Member

nickdesaulniers commented Dec 11, 2024

Do you mind folding this diff into your patch?

diff --git a/libc/test/src/strings/CMakeLists.txt b/libc/test/src/strings/CMakeLists.txt
index 963a1d6d6d60..10f96b8531f6 100644
--- a/libc/test/src/strings/CMakeLists.txt
+++ b/libc/test/src/strings/CMakeLists.txt
@@ -20,7 +20,7 @@ add_libc_test(
     index_test.cpp
   DEPENDS
     libc.src.strings.index
-    libc.test.src.strchr_test_support
+    libc.test.src.string.strchr_test_support
 )
 
 add_libc_test(
@@ -31,7 +31,7 @@ add_libc_test(
     rindex_test.cpp
   DEPENDS
     libc.src.strings.rindex
-    libc.test.src.strchr_test_support
+    libc.test.src.string.strchr_test_support
 )
 
 add_libc_test(

otherwise I'll send a new PR for it. I messed that up in #118899.

@Caslyn
Copy link
Contributor Author

Caslyn commented Dec 11, 2024

Did you happen to spot this via a build breakage, per chance? I don't have any build breakages on my end, but that's making me think I should go investigate why that would be.

Only actually spotted this while adjusting our build targets down stream in Fuchsia to match the /string -> /strings move.

@Caslyn Caslyn merged commit 36c7d14 into llvm:main Dec 11, 2024
9 of 10 checks passed
@Caslyn Caslyn deleted the adjust-header-paths branch December 11, 2024 23:02
bherrera pushed a commit to misttech/fuchsia that referenced this pull request Dec 19, 2024
This removes the exec script and old location targets for files that
were moved to /strings.

This is blocked on the merging of llvm/llvm-project#119623
into Fuchsia.

Fixed: 383347626
Change-Id: Ia8de544a2695125f888544071b08f37906fe381d
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1172249
Reviewed-by: David Fang <[email protected]>
Fuchsia-Auto-Submit: Caslyn Tonelli <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
Reviewed-by: Roland McGrath <[email protected]>
bherrera pushed a commit to misttech/integration that referenced this pull request Dec 21, 2024
This removes the exec script and old location targets for files that
were moved to /strings.

This is blocked on the merging of llvm/llvm-project#119623
into Fuchsia.

Original-Fixed: 383347626
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1172249
Original-Revision: 7447daf875ce2e8677cf86ce31f879c71806b76f
GitOrigin-RevId: 986d20c7fc3df983144976fc7839c42a2642841c
Change-Id: I28171b62ff1a16f68c4a36c90c7de8e3c25ce082
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