Skip to content
Snippets Groups Projects
Commit 458d7d2a authored by Kilian Lackhove's avatar Kilian Lackhove
Browse files

Tester: added command override

parent b0aa7a11
No related branches found
No related tags found
No related merge requests found
......@@ -82,6 +82,11 @@ namespace Nektar
return m_parameters;
}
const std::string& TestData::GetCommand() const
{
return m_command;
}
const unsigned int& TestData::GetNProcesses() const
{
return m_processes;
......@@ -166,6 +171,16 @@ namespace Nektar
m_parameters = string(tmp->GetText());
}
tmp = testElement->FirstChildElement("command");
if (tmp)
{
m_command = string(tmp->GetText());
}
else
{
m_command = "";
}
// Find parallel processes tah.
tmp = testElement->FirstChildElement("processes");
if (tmp)
......
......@@ -64,6 +64,7 @@ namespace Nektar
const std::string& GetDescription() const;
const fs::path& GetExecutable() const;
const std::string& GetParameters() const;
const std::string& GetCommand() const;
const unsigned int& GetNProcesses() const;
std::string GetMetricType(unsigned int pId) const;
......@@ -81,6 +82,7 @@ namespace Nektar
std::string m_description;
fs::path m_executable;
std::string m_parameters;
std::string m_command;
unsigned int m_processes;
TiXmlDocument* m_doc;
std::vector<TiXmlElement*> m_metrics;
......
......@@ -236,6 +236,12 @@ int main(int argc, char *argv[])
command += file.GetParameters();
command += " 1>output.out 2>output.err";
// override command if specified
if (file.GetCommand() != "")
{
command = file.GetCommand();
}
status = 0;
string line;
......
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