summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestBatchTestHandler.cxx
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2009-09-21 18:21:41 (GMT)
committerZach Mullen <zach.mullen@kitware.com>2009-09-21 18:21:41 (GMT)
commit87b4c66ca842b80da9910c34e8c92fa4a19d06b5 (patch)
tree658850138d67d08e97104331db5d6efef0efbf71 /Source/CTest/cmCTestBatchTestHandler.cxx
parente4293b4b389cbe4f15f03ff00e434d98e727e20a (diff)
downloadCMake-87b4c66ca842b80da9910c34e8c92fa4a19d06b5.zip
CMake-87b4c66ca842b80da9910c34e8c92fa4a19d06b5.tar.gz
CMake-87b4c66ca842b80da9910c34e8c92fa4a19d06b5.tar.bz2
Need to quote args when generating batch scripts from ctest
Diffstat (limited to 'Source/CTest/cmCTestBatchTestHandler.cxx')
-rw-r--r--Source/CTest/cmCTestBatchTestHandler.cxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestBatchTestHandler.cxx b/Source/CTest/cmCTestBatchTestHandler.cxx
index e722330..03c9e1c 100644
--- a/Source/CTest/cmCTestBatchTestHandler.cxx
+++ b/Source/CTest/cmCTestBatchTestHandler.cxx
@@ -1,3 +1,20 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+
#include "cmCTestBatchTestHandler.h"
#include "cmProcess.h"
#include "cmStandardIncludes.h"
@@ -23,7 +40,7 @@ void cmCTestBatchTestHandler::WriteBatchScript()
+ "/Testing/CTestBatch.txt";
std::fstream fout;
fout.open(this->Script.c_str(), std::ios::out);
- fout << "# !/bin/sh\n";
+ fout << "#!/bin/sh\n";
for(TestMap::iterator i = this->Tests.begin(); i != this->Tests.end(); ++i)
{
@@ -90,7 +107,7 @@ void cmCTestBatchTestHandler::WriteTestCommand(int test, std::fstream& fout)
++i; //the executable (command)
for(; i != args.end(); ++i)
{
- fout << *i << " "; //args to the test executable
+ fout << "\"" << *i << "\" "; //args to the test executable
}
//TODO ZACH build TestResult.FullCommandLine
//this->TestResult.FullCommandLine = this->TestCommand;