Start working on improved test
This commit is contained in:
parent
6ecc00601c
commit
2cd431d905
18
Source/CTest/CMakeLists.txt
Normal file
18
Source/CTest/CMakeLists.txt
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
CMAKE_MINIMUM_REQUIRED(VERSION 1.5)
|
||||||
|
PROJECT(CTEST CXX)
|
||||||
|
|
||||||
|
SUBDIRS(Curl)
|
||||||
|
|
||||||
|
FIND_LIBRARY(CMAKE_LIBRARY NAMES CMakeLib PATHS
|
||||||
|
${CTEST_BINARY_DIR}/..)
|
||||||
|
|
||||||
|
SET(CTEST_SRCS
|
||||||
|
../ctest.cxx
|
||||||
|
../cmCTest.cxx
|
||||||
|
cmCTestSubmit.cxx)
|
||||||
|
|
||||||
|
INCLUDE_DIRECTORIES(${CTEST_SOURCE_DIR}/..)
|
||||||
|
|
||||||
|
ADD_DEFINITIONS(-DHAVE_CURL)
|
||||||
|
ADD_EXECUTABLE(ctest ${CTEST_SRCS})
|
||||||
|
TARGET_LINK_LIBRARIES(ctest ${CMAKE_LIBRARY} Curl)
|
38
Source/CTest/cmCTestSubmit.cxx
Normal file
38
Source/CTest/cmCTestSubmit.cxx
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/*=========================================================================
|
||||||
|
|
||||||
|
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 "cmCTestSubmit.h"
|
||||||
|
#include "cmSystemTools.h"
|
||||||
|
|
||||||
|
bool cmCTestSubmit::SubmitUsingFTP(const std::vector<std::string>& files,
|
||||||
|
const std::string& prefix,
|
||||||
|
const std::string& url)
|
||||||
|
{
|
||||||
|
std::string::size_type cc;
|
||||||
|
for ( cc = 0; cc < files.size(); cc ++ )
|
||||||
|
{
|
||||||
|
std::cout << "upload file: " << files[cc].c_str() << " to " << url.c_str()
|
||||||
|
<< " / " << prefix.c_str() << " " << files[cc].c_str() << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cmCTestSubmit::SubmitUsingSCP(const std::vector<std::string>& files,
|
||||||
|
const std::string& prefix,
|
||||||
|
const std::string& url)
|
||||||
|
{
|
||||||
|
std::cout << "SubmitUsingSCP is not yet implemented" << std::endl;
|
||||||
|
}
|
43
Source/CTest/cmCTestSubmit.h
Normal file
43
Source/CTest/cmCTestSubmit.h
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*=========================================================================
|
||||||
|
|
||||||
|
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 cmCTestSubmit_h
|
||||||
|
#define cmCTestSubmit_h
|
||||||
|
|
||||||
|
#include "cmStandardIncludes.h"
|
||||||
|
|
||||||
|
/** \class cmCTestSubmit
|
||||||
|
* \brief Helper class for CTest
|
||||||
|
*
|
||||||
|
* Submit testing results
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class cmCTestSubmit
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
cmCTestSubmit() {}
|
||||||
|
~cmCTestSubmit() {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Submit file using various ways
|
||||||
|
*/
|
||||||
|
bool SubmitUsingFTP(const std::vector<std::string>& files,
|
||||||
|
const std::string& prefix, const std::string& url);
|
||||||
|
bool SubmitUsingSCP(const std::vector<std::string>& files,
|
||||||
|
const std::string& prefix, const std::string& url);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
Loading…
x
Reference in New Issue
Block a user