1 //===-- Implementation of the file path generator for bazel ---------------===//
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
7 //===----------------------------------------------------------------------===//
13 #include "src/__support/CPP/string.h"
14 #include "src/__support/c_string.h"
16 namespace LIBC_NAMESPACE::testing
{
18 CString
libc_make_test_file_path_func(const char *file_name
) {
19 // This is the path to the folder bazel wants the test outputs written to.
20 const char *UNDECLARED_OUTPUTS_PATH
= getenv("TEST_UNDECLARED_OUTPUTS_DIR");
22 return cpp::string(UNDECLARED_OUTPUTS_PATH
) + file_name
;
25 } // namespace LIBC_NAMESPACE::testing