summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2009-09-21 19:29:34 (GMT)
committerZach Mullen <zach.mullen@kitware.com>2009-09-21 19:29:34 (GMT)
commit4342e37d63012065ac267ad6286b6b7619366e43 (patch)
tree44016cfe975d469b0c47ce2751131129b6899557
parenta89bedfc6e2d64ae300fe0bfabfe48b5db8472ab (diff)
downloadCMake-4342e37d63012065ac267ad6286b6b7619366e43.zip
CMake-4342e37d63012065ac267ad6286b6b7619366e43.tar.gz
CMake-4342e37d63012065ac267ad6286b6b7619366e43.tar.bz2
More SLURM experimentation (ctest batch mode)
-rw-r--r--Source/CTest/cmCTestBatchTestHandler.cxx22
1 files changed, 17 insertions, 5 deletions
diff --git a/Source/CTest/cmCTestBatchTestHandler.cxx b/Source/CTest/cmCTestBatchTestHandler.cxx
index f8d5b80..65566f7 100644
--- a/Source/CTest/cmCTestBatchTestHandler.cxx
+++ b/Source/CTest/cmCTestBatchTestHandler.cxx
@@ -58,11 +58,12 @@ void cmCTestBatchTestHandler::WriteSrunArgs(int test, std::fstream& fout)
cmCTestTestHandler::cmCTestTestProperties* properties =
this->Properties[test];
- fout << "srun --jobid=" << test << " ";
+ fout << "srun ";
+ //fout << "--jobid=" << test << " ";
fout << "-J=" << properties->Name << " ";
//Write dependency information
- if(this->Tests[test].size() > 0)
+ /*if(this->Tests[test].size() > 0)
{
fout << "-P=afterany";
for(TestSet::iterator i = this->Tests[test].begin();
@@ -71,7 +72,7 @@ void cmCTestBatchTestHandler::WriteSrunArgs(int test, std::fstream& fout)
fout << ":" << *i;
}
fout << " ";
- }
+ }*/
if(properties->RunSerial)
{
fout << "--exclusive ";
@@ -105,9 +106,20 @@ void cmCTestBatchTestHandler::WriteTestCommand(int test, std::fstream& fout)
std::vector<std::string>::iterator i = args.begin();
++i; //the test name
++i; //the executable (command)
- for(; i != args.end(); ++i)
+ if(args.size() > 2)
+ {
+ fout << "'";
+ }
+ while(i != args.end())
{
- fout << "\"" << *i << "\" "; //args to the test executable
+ fout << "\"" << *i << "\""; //args to the test executable
+ ++i;
+
+ if(i == args.end() && args.size() > 2)
+ {
+ fout << "'";
+ }
+ fout << " ";
}
//TODO ZACH build TestResult.FullCommandLine
//this->TestResult.FullCommandLine = this->TestCommand;