1 // Copyright 2024 The BoringSSL Authors
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef OPENSSL_HEADER_CRYPTO_TEST_TEST_DATA_H
16 #define OPENSSL_HEADER_CRYPTO_TEST_TEST_DATA_H
17 
18 #include <string>
19 
20 // GetTestData returns the test data for |path|, or aborts on error. |path|
21 // must be a slash-separated path, relative to the BoringSSL source tree. By
22 // default, this is implemented by reading from the filesystem, relative to
23 // the BORINGSSL_TEST_DATA_ROOT environment variable, or the current working
24 // directory if unset.
25 //
26 // Callers with more complex needs can build with
27 // BORINGSSL_CUSTOM_GET_TEST_DATA and then link in an alternate implementation
28 // of this function.
29 //
30 // Callers running from Bazel can define BORINGSSL_USE_BAZEL_RUNFILES to use
31 // the Bazel runfiles library.
32 std::string GetTestData(const char *path);
33 
34 #endif  // OPENSSL_HEADER_CRYPTO_TEST_TEST_DATA_H
35