[libc] Switch to using the generic `<gpuintrin.h>` implementations (#121810)
[llvm-project.git] / libc / test / UnitTest / BazelFilePath.cpp
blobee5fcaaa63d91f5f6719471f60c7e0908c58f37a
1 //===-- Implementation of the file path generator for bazel ---------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "LibcTest.h"
11 #include <stdlib.h>
13 #include "src/__support/CPP/string.h"
14 #include "src/__support/c_string.h"
15 #include "src/__support/macros/config.h"
17 namespace LIBC_NAMESPACE_DECL {
18 namespace testing {
20 CString libc_make_test_file_path_func(const char *file_name) {
21 // This is the path to the folder bazel wants the test outputs written to.
22 const char *UNDECLARED_OUTPUTS_PATH = getenv("TEST_UNDECLARED_OUTPUTS_DIR");
24 return cpp::string(UNDECLARED_OUTPUTS_PATH) + file_name;
27 } // namespace testing
28 } // namespace LIBC_NAMESPACE_DECL