summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2011-02-28 20:26:24 (GMT)
committerBrad King <brad.king@kitware.com>2011-03-15 19:07:37 (GMT)
commit28cdd0a5be086004e5afedbbe5adb61be7adc9cc (patch)
tree13d6dc3b8b17b8a3af0d8d14995a6ccb634715d6 /Source/cmCTest.cxx
parentfbe435652d97a16911d418ad6dd0b455905256ca (diff)
downloadCMake-28cdd0a5be086004e5afedbbe5adb61be7adc9cc.zip
CMake-28cdd0a5be086004e5afedbbe5adb61be7adc9cc.tar.gz
CMake-28cdd0a5be086004e5afedbbe5adb61be7adc9cc.tar.bz2
Don't tar/gz ctest_upload() files
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 5827167..70b1c01 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1600,8 +1600,16 @@ std::string cmCTest::Base64GzipEncodeFile(std::string file)
"encoding file: " << file << std::endl);
return "";
}
- long len = cmSystemTools::FileLength(tarFile.c_str());
- std::ifstream ifs(tarFile.c_str(), std::ios::in
+ std::string base64 = this->Base64EncodeFile(tarFile);
+ cmSystemTools::RemoveFile(tarFile.c_str());
+ return base64;
+}
+
+//----------------------------------------------------------------------
+std::string cmCTest::Base64EncodeFile(std::string file)
+{
+ long len = cmSystemTools::FileLength(file.c_str());
+ std::ifstream ifs(file.c_str(), std::ios::in
#ifdef _WIN32
| std::ios::binary
#endif
@@ -1609,7 +1617,6 @@ std::string cmCTest::Base64GzipEncodeFile(std::string file)
unsigned char *file_buffer = new unsigned char [ len + 1 ];
ifs.read(reinterpret_cast<char*>(file_buffer), len);
ifs.close();
- cmSystemTools::RemoveFile(tarFile.c_str());
unsigned char *encoded_buffer
= new unsigned char [ static_cast<int>(
@@ -1629,6 +1636,7 @@ std::string cmCTest::Base64GzipEncodeFile(std::string file)
return base64;
}
+
//----------------------------------------------------------------------
bool cmCTest::SubmitExtraFiles(const std::vector<cmStdString> &files)
{