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.
This commit is contained in:
parent
196b6e24f6
commit
1d3a966106
13 changed files with 56 additions and 34 deletions
|
|
@ -54,8 +54,8 @@ TEST_P(ConfigTest, FromFile)
|
|||
|
||||
// Get the contents for input shader and limit configurations.
|
||||
std::string shaderContents, configContents;
|
||||
tryLoadFile(GLSLANG_TEST_DIRECTORY "/" + testCase.input, "input", &shaderContents);
|
||||
tryLoadFile(GLSLANG_TEST_DIRECTORY "/" + testCase.config, "limits config", &configContents);
|
||||
tryLoadFile(GlobalTestSettings.testRoot + "/" + testCase.input, "input", &shaderContents);
|
||||
tryLoadFile(GlobalTestSettings.testRoot + "/" + testCase.config, "limits config", &configContents);
|
||||
|
||||
// Decode limit configurations.
|
||||
TBuiltInResource resources = {};
|
||||
|
|
@ -86,7 +86,7 @@ TEST_P(ConfigTest, FromFile)
|
|||
|
||||
// Check with expected results.
|
||||
const std::string expectedOutputFname =
|
||||
GLSLANG_TEST_DIRECTORY "/baseResults/" + testCase.output;
|
||||
GlobalTestSettings.testRoot + "/baseResults/" + testCase.output;
|
||||
std::string expectedOutput;
|
||||
tryLoadFile(expectedOutputFname, "expected output", &expectedOutput);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue