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

Modifed Tester to dump output.out and output.err files on segfault.

parent 40452dc8
No related branches found
No related tags found
No related merge requests found
......@@ -231,12 +231,15 @@ int main(int argc, char *argv[])
command += file.GetParameters();
command += " 1>output.out 2>output.err";
status = 0;
string line;
// Run executable to perform test.
if (system(command.c_str()))
{
cerr << "Error occurred running test:" << endl;
cerr << "Command: " << command << endl;
throw 1;
status = 1;
}
// Check output files exist
......@@ -256,17 +259,18 @@ int main(int argc, char *argv[])
}
// Test against all metrics
status = 0;
string line;
for (int i = 0; i < metrics.size(); ++i)
if (status == 0)
{
vStdout.clear();
vStderr.clear();
vStdout.seekg(0, ios::beg);
vStderr.seekg(0, ios::beg);
if (!metrics[i]->Test(vStdout, vStderr))
for (int i = 0; i < metrics.size(); ++i)
{
status = 1;
vStdout.clear();
vStderr.clear();
vStdout.seekg(0, ios::beg);
vStderr.seekg(0, ios::beg);
if (!metrics[i]->Test(vStdout, vStderr))
{
status = 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