Gtests can be run on another source tree
The gtest executable accepts a --test-root option to specify
a root directory for test files. It defaults to the Test directory
in the source tree from which the executable is built.
For example, this lets us run test exectuables built with MinGW on Linux
on a Windows machine with its own copy of the source tree.
diff --git a/gtests/AST.FromFile.cpp b/gtests/AST.FromFile.cpp
index 7c31df0..a2e961e 100644
--- a/gtests/AST.FromFile.cpp
+++ b/gtests/AST.FromFile.cpp
@@ -43,7 +43,7 @@
TEST_P(CompileToAstTest, FromFile)
{
- loadFileCompileAndCheck(GLSLANG_TEST_DIRECTORY, GetParam(),
+ loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
Source::GLSL, Semantics::OpenGL,
Target::AST);
}