Start working on cont

This commit is contained in:
Andy Cedilnik 2003-02-10 23:19:01 -05:00
parent cdf6e1dc21
commit a69c70d2d7
3 changed files with 30 additions and 16 deletions

View File

@ -283,6 +283,8 @@ void cmCTest::Initialize()
if ( tag.size() == 0 ) if ( tag.size() == 0 )
{ {
#ifdef HAVE_CURL #ifdef HAVE_CURL
std::cout << "TestModel: " << this->GetTestModelString() << std::endl;
std::cout << "TestModel: " << m_TestModel << std::endl;
if ( m_TestModel == cmCTest::NIGHTLY ) if ( m_TestModel == cmCTest::NIGHTLY )
{ {
int hour; int hour;
@ -449,25 +451,26 @@ std::string cmCTest::FindExecutable(const char *exe)
int cmCTest::UpdateDirectory() int cmCTest::UpdateDirectory()
{ {
int count = 0;
std::string::size_type cc, kk; std::string::size_type cc, kk;
std::string cvsCommand = m_DartConfiguration["CVSCommand"]; std::string cvsCommand = m_DartConfiguration["CVSCommand"];
if ( cvsCommand.size() == 0 ) if ( cvsCommand.size() == 0 )
{ {
std::cerr << "Cannot find CVSCommand key in the DartConfiguration.tcl" << std::endl; std::cerr << "Cannot find CVSCommand key in the DartConfiguration.tcl" << std::endl;
return 1; return -1;
} }
std::string cvsOptions = m_DartConfiguration["CVSUpdateOptions"]; std::string cvsOptions = m_DartConfiguration["CVSUpdateOptions"];
if ( cvsOptions.size() == 0 ) if ( cvsOptions.size() == 0 )
{ {
std::cerr << "Cannot find CVSUpdateOptions key in the DartConfiguration.tcl" << std::endl; std::cerr << "Cannot find CVSUpdateOptions key in the DartConfiguration.tcl" << std::endl;
return 1; return -1;
} }
std::string sourceDirectory = m_DartConfiguration["SourceDirectory"]; std::string sourceDirectory = m_DartConfiguration["SourceDirectory"];
if ( sourceDirectory.size() == 0 ) if ( sourceDirectory.size() == 0 )
{ {
std::cerr << "Cannot find SourceDirectory key in the DartConfiguration.tcl" << std::endl; std::cerr << "Cannot find SourceDirectory key in the DartConfiguration.tcl" << std::endl;
return 1; return -1;
} }
std::string extra_update_opts; std::string extra_update_opts;
@ -549,6 +552,7 @@ int cmCTest::UpdateDirectory()
char mod = line[0]; char mod = line[0];
if ( line[1] == ' ' && mod != '?' ) if ( line[1] == ' ' && mod != '?' )
{ {
count ++;
const char* file = line + 2; const char* file = line + 2;
//std::cout << "Line" << cc << ": " << mod << " - " << file << std::endl; //std::cout << "Line" << cc << ": " << mod << " - " << file << std::endl;
std::string logcommand = cvsCommand + " -z3 log -N " + file + std::string logcommand = cvsCommand + " -z3 log -N " + file +
@ -765,9 +769,9 @@ int cmCTest::UpdateDirectory()
{ {
std::cerr << "Error(s) when updating the project" << std::endl; std::cerr << "Error(s) when updating the project" << std::endl;
std::cerr << "Output: " << goutput << std::endl; std::cerr << "Output: " << goutput << std::endl;
return 1; return -1;
} }
return 0; return count;
} }
int cmCTest::ConfigureDirectory() int cmCTest::ConfigureDirectory()
@ -1870,6 +1874,7 @@ int cmCTest::ProcessTests()
int res = 0; int res = 0;
bool notest = true; bool notest = true;
int cc; int cc;
int update_count = 0;
for ( cc = 0; cc < LAST_TEST; cc ++ ) for ( cc = 0; cc < LAST_TEST; cc ++ )
{ {
@ -1881,7 +1886,15 @@ int cmCTest::ProcessTests()
} }
if ( m_Tests[UPDATE_TEST] || m_Tests[ALL_TEST] ) if ( m_Tests[UPDATE_TEST] || m_Tests[ALL_TEST] )
{ {
res += this->UpdateDirectory(); update_count = this->UpdateDirectory();
if ( update_count < 0 )
{
res += 1;
}
}
if ( m_TestModel == cmCTest::CONTINUOUS && !update_count )
{
return 0;
} }
if ( m_Tests[CONFIGURE_TEST] || m_Tests[ALL_TEST] ) if ( m_Tests[CONFIGURE_TEST] || m_Tests[ALL_TEST] )
{ {

View File

@ -128,16 +128,16 @@ public:
private: private:
enum { enum {
FIRST_TEST = 0, FIRST_TEST = 0,
UPDATE_TEST, UPDATE_TEST = 1,
CONFIGURE_TEST, CONFIGURE_TEST = 2,
BUILD_TEST, BUILD_TEST = 3,
TEST_TEST, TEST_TEST = 4,
COVERAGE_TEST, COVERAGE_TEST = 5,
PURIFY_TEST, PURIFY_TEST = 6,
SUBMIT_TEST, SUBMIT_TEST = 7,
ALL_TEST, ALL_TEST = 8,
LAST_TEST LAST_TEST = 9
}; };
struct cmCTestTestResult struct cmCTestTestResult

View File

@ -72,6 +72,7 @@ int main (int argc, char *argv[])
str == "Continuous" ) str == "Continuous" )
{ {
inst.SetTestModel(cmCTest::CONTINUOUS); inst.SetTestModel(cmCTest::CONTINUOUS);
std::cout << "Continuous" << std::endl;
} }
else else
{ {