Skip to content
Snippets Groups Projects
Commit 87b4c66c authored by Zach's avatar Zach
Browse files

Need to quote args when generating batch scripts from ctest

parent e4293b4b
No related branches found
No related tags found
No related merge requests found
/*=========================================================================
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;
......
/*=========================================================================
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.
=========================================================================*/
#ifndef cmCTestBatchTestHandler_h
#define cmCTestBatchTestHandler_h
......
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