[cmake-commits] hoffman committed cmCTest.cxx 1.326 1.327
cmSystemTools.cxx 1.343 1.344 cmSystemTools.h 1.140 1.141
ctest.cxx 1.95 1.96
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Sep 11 11:21:38 EDT 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv31454/Source
Modified Files:
cmCTest.cxx cmSystemTools.cxx cmSystemTools.h ctest.cxx
Log Message:
ENH: fix 2 ctest issues, do not use the build type of ctest to look for config types, do not inherit pipes in child procs for ctest so it can kill them
Index: cmSystemTools.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.h,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -d -r1.140 -r1.141
--- cmSystemTools.h 16 Jul 2007 14:54:31 -0000 1.140
+++ cmSystemTools.h 11 Sep 2007 15:21:36 -0000 1.141
@@ -339,6 +339,12 @@
static bool ExtractTar(const char* inFileName,
const std::vector<cmStdString>& files, bool gzip,
bool verbose);
+ // This should be called first thing in main
+ // it will keep child processes from inheriting the
+ // stdin and stdout of this process. This is important
+ // if you want to be able to kill child processes and
+ // not get stuck waiting for all the output on the pipes.
+ static void DoNotInheritStdPipes();
private:
static bool s_ForceUnixPaths;
static bool s_RunCommandHideConsole;
Index: cmCTest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.cxx,v
retrieving revision 1.326
retrieving revision 1.327
diff -u -d -r1.326 -r1.327
--- cmCTest.cxx 6 Aug 2007 21:09:47 -0000 1.326
+++ cmCTest.cxx 11 Sep 2007 15:21:36 -0000 1.327
@@ -1898,14 +1898,6 @@
} // the close of the for argument loop
- // default to the build type of ctest itself if there is one
-#ifdef CMAKE_INTDIR
- if(this->ConfigType.size() == 0)
- {
- this->SetConfigType(CMAKE_INTDIR);
- }
-#endif
-
// now what sould cmake do? if --build-and-test was specified then
// we run the build and test handler and return
if(cmakeAndTest)
Index: cmSystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v
retrieving revision 1.343
retrieving revision 1.344
diff -u -d -r1.343 -r1.344
--- cmSystemTools.cxx 14 Aug 2007 14:27:34 -0000 1.343
+++ cmSystemTools.cxx 11 Sep 2007 15:21:36 -0000 1.344
@@ -1976,3 +1976,20 @@
}
}
+void cmSystemTools::DoNotInheritStdPipes()
+{
+ {
+ HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE);
+ DuplicateHandle(GetCurrentProcess(), out,
+ GetCurrentProcess(), &out, 0, FALSE,
+ DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
+ SetStdHandle(STD_OUTPUT_HANDLE, out);
+ }
+ {
+ HANDLE out = GetStdHandle(STD_ERROR_HANDLE);
+ DuplicateHandle(GetCurrentProcess(), out,
+ GetCurrentProcess(), &out, 0, FALSE,
+ DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
+ SetStdHandle(STD_ERROR_HANDLE, out);
+ }
+}
Index: ctest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/ctest.cxx,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -d -r1.95 -r1.96
--- ctest.cxx 8 Jun 2007 20:06:33 -0000 1.95
+++ ctest.cxx 11 Sep 2007 15:21:36 -0000 1.96
@@ -22,7 +22,6 @@
#include "cmDocumentation.h"
#include "CTest/cmCTestScriptHandler.h"
-
//----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationName[] =
{
@@ -209,6 +208,7 @@
// this is a test driver program for cmCTest.
int main (int argc, char *argv[])
{
+ cmSystemTools::DoNotInheritStdPipes();
cmSystemTools::EnableMSVCDebugHook();
int nocwd = 0;
cmCTest inst;
More information about the Cmake-commits
mailing list