Skip to content

Commit

Permalink
better error output when no filler is found for --singletest filter
Browse files Browse the repository at this point in the history
  • Loading branch information
winsvega committed Nov 26, 2019
1 parent ac3f4cb commit 8bbe42b
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions retesteth/TestSuite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,7 @@ string TestSuite::checkFillerExistance(string const& _testFolder) const
string exceptionStr;
if (checkFillerWhenFilterIsSetButNoTestsFilled)
exceptionStr = "Could not find a filler for provided --singletest filter: '" +
file.filename().string() +
"', or no tests were found in the test suite folder!";
file.filename().string() + "'";
else
exceptionStr =
"Compiled test folder contains test without Filler: " + file.filename().string();
Expand Down Expand Up @@ -330,7 +329,17 @@ void TestSuite::runAllTestsInFolder(string const& _testFolder) const
}

// check that destination folder test files has according Filler file in src folder
string const filter = checkFillerExistance(_testFolder);
string filter;
try
{
filter = checkFillerExistance(_testFolder);
}
catch (std::exception const&)
{
TestOutputHelper::get().initTest(1);
TestOutputHelper::get().finishTest();
return;
}

// run all tests
AbsoluteFillerPath fillerPath = getFullPathFiller(_testFolder);
Expand Down

0 comments on commit 8bbe42b

Please sign in to comment.