diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-01-07 04:07:24 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-01-07 04:07:24 (GMT) |
commit | 2cd431d905d8dd33a59b095853e5ba7f4b66a9eb (patch) | |
tree | f4102d334c22f3bfca15851ea89df97417e66576 /Source | |
parent | 6ecc00601c90fc656eb92cdadf2758adba2816c3 (diff) | |
download | CMake-2cd431d905d8dd33a59b095853e5ba7f4b66a9eb.zip CMake-2cd431d905d8dd33a59b095853e5ba7f4b66a9eb.tar.gz CMake-2cd431d905d8dd33a59b095853e5ba7f4b66a9eb.tar.bz2 |
Start working on improved test
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/CMakeLists.txt | 18 | ||||
-rw-r--r-- | Source/CTest/cmCTestSubmit.cxx | 38 | ||||
-rw-r--r-- | Source/CTest/cmCTestSubmit.h | 43 |
3 files changed, 99 insertions, 0 deletions
diff --git a/Source/CTest/CMakeLists.txt b/Source/CTest/CMakeLists.txt new file mode 100644 index 0000000..130caea --- /dev/null +++ b/Source/CTest/CMakeLists.txt @@ -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)
\ No newline at end of file diff --git a/Source/CTest/cmCTestSubmit.cxx b/Source/CTest/cmCTestSubmit.cxx new file mode 100644 index 0000000..dbe9283 --- /dev/null +++ b/Source/CTest/cmCTestSubmit.cxx @@ -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; +} diff --git a/Source/CTest/cmCTestSubmit.h b/Source/CTest/cmCTestSubmit.h new file mode 100644 index 0000000..f8adcd9 --- /dev/null +++ b/Source/CTest/cmCTestSubmit.h @@ -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 |