diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-04-01 19:11:17 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-04-01 19:11:17 (GMT) |
commit | dd9241121d4b270564174f67672c31c0bf07cde8 (patch) | |
tree | f7385b8f2c906e481d5330448b66f1bf17fdd517 /Source/cmCTest.cxx | |
parent | 3e0817eb55f087a60d0676b5bb95fa0a0be62196 (diff) | |
download | CMake-dd9241121d4b270564174f67672c31c0bf07cde8.zip CMake-dd9241121d4b270564174f67672c31c0bf07cde8.tar.gz CMake-dd9241121d4b270564174f67672c31c0bf07cde8.tar.bz2 |
ENH: Add logging of submitting
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 0a49349..6f984f6 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2442,6 +2442,9 @@ int cmCTest::TestDirectory(bool memcheck) int cmCTest::SubmitResults() { + std::ofstream ofs; + this->OpenOutputFile("Temporary", "LastSubmit.log", ofs); + cmCTest::tm_VectorOfStrings files; std::string prefix = this->GetSubmitResultsPrefix(); // TODO: @@ -2497,11 +2500,25 @@ int cmCTest::SubmitResults() { files.push_back("Notes.xml"); } + + if ( ofs ) + { + ofs << "Upload files:" << std::endl; + int cnt = 0; + cmCTest::tm_VectorOfStrings::iterator it; + for ( it = files.begin(); it != files.end(); ++ it ) + { + ofs << cnt << "\t" << it->c_str() << std::endl; + cnt ++; + } + } cmCTestSubmit submit; submit.SetVerbose(m_Verbose); + submit.SetLogFile(&ofs); if ( m_DartConfiguration["DropMethod"] == "" || m_DartConfiguration["DropMethod"] == "ftp" ) { + ofs << "Using drop method: FTP" << std::endl; std::cout << " Using FTP submit method" << std::endl; std::string url = "ftp://"; url += cmCTest::MakeURLSafe(m_DartConfiguration["DropSiteUser"]) + ":" + @@ -2512,18 +2529,22 @@ int cmCTest::SubmitResults() files, prefix, url) ) { std::cerr << " Problems when submitting via FTP" << std::endl; + ofs << " Problems when submitting via FTP" << std::endl; return 0; } if ( !submit.TriggerUsingHTTP(files, prefix, m_DartConfiguration["TriggerSite"]) ) { std::cerr << " Problems when triggering via HTTP" << std::endl; + ofs << " Problems when triggering via HTTP" << std::endl; return 0; } std::cout << " Submission successfull" << std::endl; + ofs << " Submission succesfull" << std::endl; return 1; } else if ( m_DartConfiguration["DropMethod"] == "http" ) { + ofs << "Using drop method: HTTP" << std::endl; std::cout << " Using HTTP submit method" << std::endl; std::string url = "http://"; if ( m_DartConfiguration["DropSiteUser"].size() > 0 ) @@ -2539,19 +2560,23 @@ int cmCTest::SubmitResults() if ( !submit.SubmitUsingHTTP(m_ToplevelPath+"/Testing/"+m_CurrentTag, files, prefix, url) ) { std::cerr << " Problems when submitting via HTTP" << std::endl; + ofs << " Problems when submitting via HTTP" << std::endl; return 0; } if ( !submit.TriggerUsingHTTP(files, prefix, m_DartConfiguration["TriggerSite"]) ) { std::cerr << " Problems when triggering via HTTP" << std::endl; + ofs << " Problems when triggering via HTTP" << std::endl; return 0; } std::cout << " Submission successfull" << std::endl; + ofs << " Submission succesfull" << std::endl; return 1; } else { std::cerr << "SCP submit not yet implemented" << std::endl; + ofs << "SCP submit not yet implemented" << std::endl; } return 0; |