Helper class to access bazel runfiles in a test environment.
More...
#include "donner/base/tests/Runfiles.h"
|
| std::string | Rlocation (const std::string &path) const |
| | Get the runfile location for the given relative path.
|
| std::string | RlocationExternal (const std::string &repository, const std::string &path) const |
| | Get the runfile location for the given relative path in an external repository.
|
|
|
static Runfiles & | instance () |
| | Get the Runfiles singleton instance.
|
Helper class to access bazel runfiles in a test environment.
To get the filename for a binary, use Runfiles::instance().Rlocation("path/to/file").
◆ Rlocation()
| std::string donner::Runfiles::Rlocation |
( |
const std::string & | path | ) |
const |
|
inline |
Get the runfile location for the given relative path.
- Parameters
-
| path | Relative path to the file. |
◆ RlocationExternal()
| std::string donner::Runfiles::RlocationExternal |
( |
const std::string & | repository, |
|
|
const std::string & | path ) const |
|
inline |
Get the runfile location for the given relative path in an external repository.
- Parameters
-
| repository | External repository name, corresponding to the "@repo-name" in the BUILD file. If the name is "@repo-name", specify "repo-name" here. |
| path | Relative path to the file. |
The documentation for this class was generated from the following file: