From 4342e37d63012065ac267ad6286b6b7619366e43 Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Mon, 21 Sep 2009 15:29:34 -0400 Subject: More SLURM experimentation (ctest batch mode) --- Source/CTest/cmCTestBatchTestHandler.cxx | 22 +++++++++++++++++----- 1 file 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::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; -- cgit v0.12