More SLURM experimentation (ctest batch mode)

This commit is contained in:
Zach Mullen 2009-09-21 15:29:34 -04:00
parent a89bedfc6e
commit 4342e37d63

View File

@ -58,11 +58,12 @@ void cmCTestBatchTestHandler::WriteSrunArgs(int test, std::fstream& fout)
cmCTestTestHandler::cmCTestTestProperties* properties = cmCTestTestHandler::cmCTestTestProperties* properties =
this->Properties[test]; this->Properties[test];
fout << "srun --jobid=" << test << " "; fout << "srun ";
//fout << "--jobid=" << test << " ";
fout << "-J=" << properties->Name << " "; fout << "-J=" << properties->Name << " ";
//Write dependency information //Write dependency information
if(this->Tests[test].size() > 0) /*if(this->Tests[test].size() > 0)
{ {
fout << "-P=afterany"; fout << "-P=afterany";
for(TestSet::iterator i = this->Tests[test].begin(); for(TestSet::iterator i = this->Tests[test].begin();
@ -71,7 +72,7 @@ void cmCTestBatchTestHandler::WriteSrunArgs(int test, std::fstream& fout)
fout << ":" << *i; fout << ":" << *i;
} }
fout << " "; fout << " ";
} }*/
if(properties->RunSerial) if(properties->RunSerial)
{ {
fout << "--exclusive "; fout << "--exclusive ";
@ -105,9 +106,20 @@ void cmCTestBatchTestHandler::WriteTestCommand(int test, std::fstream& fout)
std::vector<std::string>::iterator i = args.begin(); std::vector<std::string>::iterator i = args.begin();
++i; //the test name ++i; //the test name
++i; //the executable (command) ++i; //the executable (command)
for(; i != args.end(); ++i) if(args.size() > 2)
{ {
fout << "\"" << *i << "\" "; //args to the test executable fout << "'";
}
while(i != args.end())
{
fout << "\"" << *i << "\""; //args to the test executable
++i;
if(i == args.end() && args.size() > 2)
{
fout << "'";
}
fout << " ";
} }
//TODO ZACH build TestResult.FullCommandLine //TODO ZACH build TestResult.FullCommandLine
//this->TestResult.FullCommandLine = this->TestCommand; //this->TestResult.FullCommandLine = this->TestCommand;