From d7cc2480cb6e465ce01eb245e7edbad2c68c44d8 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Tue, 3 Dec 2019 12:45:43 -0800 Subject: Add RunfilesPath to test_util A few tests have their own ad-hoc implementations. Add a single common one. PiperOrigin-RevId: 283601666 --- test/util/test_util.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/util/test_util.h') diff --git a/test/util/test_util.h b/test/util/test_util.h index dc30575b8..ee6c2bf4d 100644 --- a/test/util/test_util.h +++ b/test/util/test_util.h @@ -764,6 +764,12 @@ MATCHER_P2(EquivalentWithin, target, tolerance, return Equivalent(arg, target, tolerance); } +// Returns the absolute path to the a data dependency. 'path' is the runfile +// location relative to workspace root. +#ifdef __linux__ +std::string RunfilePath(std::string path); +#endif + void TestInit(int* argc, char*** argv); } // namespace testing -- cgit v1.2.3