[Cmake-commits] CMake branch, next, updated. v3.0.0-4262-g9cfdb3b
Clinton Stimpson
clinton at elemtech.com
Tue Jul 15 13:19:19 EDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 9cfdb3b3a43de0366b59c18ee1dc86a24299eefd (commit)
via 5e01ee2ea9b2062969710d8eed00620bbfc61608 (commit)
from 1a1cd48d9ca07d15b854bccdf81150c50ce4a3fc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9cfdb3b3a43de0366b59c18ee1dc86a24299eefd
commit 9cfdb3b3a43de0366b59c18ee1dc86a24299eefd
Merge: 1a1cd48 5e01ee2
Author: Clinton Stimpson <clinton at elemtech.com>
AuthorDate: Tue Jul 15 13:19:19 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jul 15 13:19:19 2014 -0400
Merge topic 'encoding-ctest-fixes' into next
5e01ee2e Encoding: Fix a few encoding problems with ctest.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5e01ee2ea9b2062969710d8eed00620bbfc61608
commit 5e01ee2ea9b2062969710d8eed00620bbfc61608
Author: Clinton Stimpson <clinton at elemtech.com>
AuthorDate: Tue Jul 15 11:11:18 2014 -0600
Commit: Clinton Stimpson <clinton at elemtech.com>
CommitDate: Tue Jul 15 11:12:57 2014 -0600
Encoding: Fix a few encoding problems with ctest.
This also fixes some test failures on Windows when the
name of the build directory contains non-ascii characters.
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 7c72cba..109905c 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -225,8 +225,8 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
std::string upload_as
= url + "/" + remoteprefix + cmSystemTools::GetFilenameName(*file);
- struct stat st;
- if ( ::stat(local_file.c_str(), &st) )
+
+ if ( !cmSystemTools::FileExists(local_file.c_str()) )
{
cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot find file: "
<< local_file << std::endl);
@@ -234,6 +234,7 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
::curl_global_cleanup();
return false;
}
+ unsigned long filelen = cmSystemTools::FileLength(local_file.c_str());
ftpfile = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
*this->LogFile << "\tUpload file: " << local_file << " to "
@@ -252,7 +253,7 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
// and give the size of the upload (optional)
::curl_easy_setopt(curl, CURLOPT_INFILESIZE,
- static_cast<long>(st.st_size));
+ static_cast<long>(filelen));
// and give curl the buffer for errors
::curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, &error_buffer);
@@ -466,8 +467,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
upload_as += md5;
}
- struct stat st;
- if ( ::stat(local_file.c_str(), &st) )
+ if( !cmSystemTools::FileExists(local_file.c_str()) )
{
cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot find file: "
<< local_file << std::endl);
@@ -475,11 +475,12 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
::curl_global_cleanup();
return false;
}
+ unsigned long filelen = cmSystemTools::FileLength(local_file.c_str());
ftpfile = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: "
<< local_file << " to "
- << upload_as << " Size: " << st.st_size << std::endl);
+ << upload_as << " Size: " << filelen << std::endl);
// specify target
::curl_easy_setopt(curl,CURLOPT_URL, upload_as.c_str());
@@ -489,7 +490,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
// and give the size of the upload (optional)
::curl_easy_setopt(curl, CURLOPT_INFILESIZE,
- static_cast<long>(st.st_size));
+ static_cast<long>(filelen));
// and give curl the buffer for errors
::curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, &error_buffer);
diff --git a/Tests/CTestTestMemcheck/memtester.cxx.in b/Tests/CTestTestMemcheck/memtester.cxx.in
index 55a34e3..fd8a2a8 100644
--- a/Tests/CTestTestMemcheck/memtester.cxx.in
+++ b/Tests/CTestTestMemcheck/memtester.cxx.in
@@ -1,11 +1,18 @@
#include <cmSystemTools.h>
+#include <cmsys/Encoding.hxx>
#include <string>
#define RETVAL @_retval@
int
-main(int argc, char **argv)
+main(int ac, char **av)
{
+ setlocale(LC_CTYPE, "");
+ cmsys::Encoding::CommandLineArguments args =
+ cmsys::Encoding::CommandLineArguments::Main(ac, av);
+ int argc = args.argc();
+ const char* const* argv = args.argv();
+
std::string exename = argv[0];
std::string logarg;
bool nextarg = false;
-----------------------------------------------------------------------
Summary of changes:
Source/CTest/cmCTestSubmitHandler.cxx | 15 ++++++++-------
Tests/CTestTestMemcheck/memtester.cxx.in | 9 ++++++++-
2 files changed, 16 insertions(+), 8 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list