Skip to content
Snippets Groups Projects
Commit bc74ba9e authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Improved message output on failure.

Fixed adding -g flag on debug build.
parent 990f85d0
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,9 @@ namespace Nektar
if (fabs(boost::lexical_cast<double>(okValues[i-1]) -
boost::lexical_cast<double>(match)) > 1e-6)
{
cout << "Failed tolerance match." << endl;
cout << " Expected: " << okValues[i-1] << endl;
cout << " Result: " << match << endl;
return false;
}
}
......@@ -98,6 +101,9 @@ namespace Nektar
// Case insensitive match.
if (!boost::iequals(match, okValues[i-1]))
{
cout << "Failed case-insensitive match." << endl;
cout << " Expected: " << okValues[i-1] << endl;
cout << " Result: " << match << endl;
return false;
}
}
......
......@@ -122,14 +122,20 @@ int main(int argc, char *argv[])
// Construct command to run
std::string command;
command += PortablePath(std::string(BUILD_PATH) + "/" + file.GetExecutable());
//#if defined(NDEBUG)
#if defined(NDEBUG)
#else
command += "-g";
//#endif
#endif
command += " " + file.GetParameters();
command += " 1>output.out 2>output.err";
// Run executable and perform tests.
int status=system(command.c_str());
if (status)
{
cout << "Failed to execute command: " << command << endl;
return 1;
}
// Open the output files and test against all metrics
ifstream vStdout("output.out");
......@@ -138,7 +144,6 @@ int main(int argc, char *argv[])
{
if (!metrics[i]->Test(vStdout, vStderr))
{
cout << "FAILED" << endl;
return 1;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment