[libc-commits] [libc] 6b7cd64 - [libc][bazel] Append '/' to TEST_UNDECLARED_OUTPUTS_DIR (#207710)
via libc-commits
libc-commits at lists.llvm.org
Thu Jul 9 00:48:00 PDT 2026
Author: Pavel Labath
Date: 2026-07-09T09:47:55+02:00
New Revision: 6b7cd6499b1638ad4341148ab70f28cd5ac23e20
URL: https://github.com/llvm/llvm-project/commit/6b7cd6499b1638ad4341148ab70f28cd5ac23e20
DIFF: https://github.com/llvm/llvm-project/commit/6b7cd6499b1638ad4341148ab70f28cd5ac23e20.diff
LOG: [libc][bazel] Append '/' to TEST_UNDECLARED_OUTPUTS_DIR (#207710)
The environment variable does not end with a slash, so we need to add
one. Without this, the tests work, but don't achieve the intended effect
of writing to the undeclared outputs dir.
Added:
Modified:
libc/test/UnitTest/BazelFilePath.cpp
Removed:
################################################################################
diff --git a/libc/test/UnitTest/BazelFilePath.cpp b/libc/test/UnitTest/BazelFilePath.cpp
index 7f9f42b46dca9..03ac56f083b9c 100644
--- a/libc/test/UnitTest/BazelFilePath.cpp
+++ b/libc/test/UnitTest/BazelFilePath.cpp
@@ -23,9 +23,9 @@ CString libc_make_test_file_path_func(const char *file_name) {
// Do something sensible if not run under bazel, otherwise this may segfault
// when constructing the string.
if (UNDECLARED_OUTPUTS_PATH == nullptr)
- UNDECLARED_OUTPUTS_PATH = "";
+ return cpp::string(file_name);
- return cpp::string(UNDECLARED_OUTPUTS_PATH) + file_name;
+ return cpp::string(UNDECLARED_OUTPUTS_PATH) + "/" + file_name;
}
} // namespace testing
More information about the libc-commits
mailing list