ENH: Add cmCTestCVS and cmCTestSVN
These cmCTestVC subclasses will implement interaction with CVS and SVN tools.
This commit is contained in:
parent
1b8ea27bd1
commit
6bdc2b5d99
|
@ -345,6 +345,10 @@ SET(CTEST_SRCS cmCTest.cxx
|
||||||
|
|
||||||
CTest/cmCTestVC.cxx
|
CTest/cmCTestVC.cxx
|
||||||
CTest/cmCTestVC.h
|
CTest/cmCTestVC.h
|
||||||
|
CTest/cmCTestCVS.cxx
|
||||||
|
CTest/cmCTestCVS.h
|
||||||
|
CTest/cmCTestSVN.cxx
|
||||||
|
CTest/cmCTestSVN.h
|
||||||
)
|
)
|
||||||
|
|
||||||
# Build CTestLib
|
# Build CTestLib
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*=========================================================================
|
||||||
|
|
||||||
|
Program: CMake - Cross-Platform Makefile Generator
|
||||||
|
Module: $RCSfile$
|
||||||
|
Language: C++
|
||||||
|
Date: $Date$
|
||||||
|
Version: $Revision$
|
||||||
|
|
||||||
|
Copyright (c) 2002 Kitware, Inc. 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 "cmCTestCVS.h"
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
cmCTestCVS::cmCTestCVS(cmCTest* ct, std::ostream& log): cmCTestVC(ct, log)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
cmCTestCVS::~cmCTestCVS()
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
/*=========================================================================
|
||||||
|
|
||||||
|
Program: CMake - Cross-Platform Makefile Generator
|
||||||
|
Module: $RCSfile$
|
||||||
|
Language: C++
|
||||||
|
Date: $Date$
|
||||||
|
Version: $Revision$
|
||||||
|
|
||||||
|
Copyright (c) 2002 Kitware, Inc. 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 cmCTestCVS_h
|
||||||
|
#define cmCTestCVS_h
|
||||||
|
|
||||||
|
#include "cmCTestVC.h"
|
||||||
|
|
||||||
|
/** \class cmCTestCVS
|
||||||
|
* \brief Interaction with cvs command-line tool
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class cmCTestCVS: public cmCTestVC
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
/** Construct with a CTest instance and update log stream. */
|
||||||
|
cmCTestCVS(cmCTest* ctest, std::ostream& log);
|
||||||
|
|
||||||
|
virtual ~cmCTestCVS();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*=========================================================================
|
||||||
|
|
||||||
|
Program: CMake - Cross-Platform Makefile Generator
|
||||||
|
Module: $RCSfile$
|
||||||
|
Language: C++
|
||||||
|
Date: $Date$
|
||||||
|
Version: $Revision$
|
||||||
|
|
||||||
|
Copyright (c) 2002 Kitware, Inc. 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 "cmCTestSVN.h"
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
cmCTestSVN::cmCTestSVN(cmCTest* ct, std::ostream& log): cmCTestVC(ct, log)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
cmCTestSVN::~cmCTestSVN()
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
/*=========================================================================
|
||||||
|
|
||||||
|
Program: CMake - Cross-Platform Makefile Generator
|
||||||
|
Module: $RCSfile$
|
||||||
|
Language: C++
|
||||||
|
Date: $Date$
|
||||||
|
Version: $Revision$
|
||||||
|
|
||||||
|
Copyright (c) 2002 Kitware, Inc. 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 cmCTestSVN_h
|
||||||
|
#define cmCTestSVN_h
|
||||||
|
|
||||||
|
#include "cmCTestVC.h"
|
||||||
|
|
||||||
|
/** \class cmCTestSVN
|
||||||
|
* \brief Interaction with subversion command-line tool
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class cmCTestSVN: public cmCTestVC
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
/** Construct with a CTest instance and update log stream. */
|
||||||
|
cmCTestSVN(cmCTest* ctest, std::ostream& log);
|
||||||
|
|
||||||
|
virtual ~cmCTestSVN();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -27,6 +27,12 @@
|
||||||
#include "cmXMLParser.h"
|
#include "cmXMLParser.h"
|
||||||
#include "cmXMLSafe.h"
|
#include "cmXMLSafe.h"
|
||||||
|
|
||||||
|
#include "cmCTestVC.h"
|
||||||
|
#include "cmCTestCVS.h"
|
||||||
|
#include "cmCTestSVN.h"
|
||||||
|
|
||||||
|
#include <cmsys/auto_ptr.hxx>
|
||||||
|
|
||||||
//#include <cmsys/RegularExpression.hxx>
|
//#include <cmsys/RegularExpression.hxx>
|
||||||
#include <cmsys/Process.h>
|
#include <cmsys/Process.h>
|
||||||
|
|
||||||
|
@ -323,6 +329,17 @@ int cmCTestUpdateHandler::ProcessHandler()
|
||||||
<< " repository type"
|
<< " repository type"
|
||||||
<< std::endl;);
|
<< std::endl;);
|
||||||
|
|
||||||
|
// Create an object to interact with the VCS tool.
|
||||||
|
cmsys::auto_ptr<cmCTestVC> vc;
|
||||||
|
switch (this->UpdateType)
|
||||||
|
{
|
||||||
|
case e_CVS: vc.reset(new cmCTestCVS(this->CTest, ofs)); break;
|
||||||
|
case e_SVN: vc.reset(new cmCTestSVN(this->CTest, ofs)); break;
|
||||||
|
default: vc.reset(new cmCTestVC(this->CTest, ofs)); break;
|
||||||
|
}
|
||||||
|
vc->SetCommandLineTool(this->UpdateCommand);
|
||||||
|
vc->SetSourceDirectory(sourceDirectory);
|
||||||
|
|
||||||
// And update options
|
// And update options
|
||||||
std::string updateOptions
|
std::string updateOptions
|
||||||
= this->CTest->GetCTestConfiguration("UpdateOptions");
|
= this->CTest->GetCTestConfiguration("UpdateOptions");
|
||||||
|
|
Loading…
Reference in New Issue