summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-02-11 04:19:01 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-02-11 04:19:01 (GMT)
commita69c70d2d7301d8550ceff35c7674630c4b512bc (patch)
tree192b6ae88f8900f4ecac082914b760e6040b0575 /Source
parentcdf6e1dc2101fb251c7ebbf6fe3826fc55f2c28e (diff)
downloadCMake-a69c70d2d7301d8550ceff35c7674630c4b512bc.zip
CMake-a69c70d2d7301d8550ceff35c7674630c4b512bc.tar.gz
CMake-a69c70d2d7301d8550ceff35c7674630c4b512bc.tar.bz2
Start working on cont
Diffstat (limited to 'Source')
-rw-r--r--Source/cmCTest.cxx25
-rw-r--r--Source/cmCTest.h20
-rw-r--r--Source/ctest.cxx1
3 files changed, 30 insertions, 16 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 050208a..454ddf3 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -283,6 +283,8 @@ void cmCTest::Initialize()
if ( tag.size() == 0 )
{
#ifdef HAVE_CURL
+ std::cout << "TestModel: " << this->GetTestModelString() << std::endl;
+ std::cout << "TestModel: " << m_TestModel << std::endl;
if ( m_TestModel == cmCTest::NIGHTLY )
{
int hour;
@@ -449,25 +451,26 @@ std::string cmCTest::FindExecutable(const char *exe)
int cmCTest::UpdateDirectory()
{
+ int count = 0;
std::string::size_type cc, kk;
std::string cvsCommand = m_DartConfiguration["CVSCommand"];
if ( cvsCommand.size() == 0 )
{
std::cerr << "Cannot find CVSCommand key in the DartConfiguration.tcl" << std::endl;
- return 1;
+ return -1;
}
std::string cvsOptions = m_DartConfiguration["CVSUpdateOptions"];
if ( cvsOptions.size() == 0 )
{
std::cerr << "Cannot find CVSUpdateOptions key in the DartConfiguration.tcl" << std::endl;
- return 1;
+ return -1;
}
std::string sourceDirectory = m_DartConfiguration["SourceDirectory"];
if ( sourceDirectory.size() == 0 )
{
std::cerr << "Cannot find SourceDirectory key in the DartConfiguration.tcl" << std::endl;
- return 1;
+ return -1;
}
std::string extra_update_opts;
@@ -549,6 +552,7 @@ int cmCTest::UpdateDirectory()
char mod = line[0];
if ( line[1] == ' ' && mod != '?' )
{
+ count ++;
const char* file = line + 2;
//std::cout << "Line" << cc << ": " << mod << " - " << file << std::endl;
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 << "Output: " << goutput << std::endl;
- return 1;
+ return -1;
}
- return 0;
+ return count;
}
int cmCTest::ConfigureDirectory()
@@ -1870,6 +1874,7 @@ int cmCTest::ProcessTests()
int res = 0;
bool notest = true;
int cc;
+ int update_count = 0;
for ( cc = 0; cc < LAST_TEST; cc ++ )
{
@@ -1881,7 +1886,15 @@ int cmCTest::ProcessTests()
}
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] )
{
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index f23f306..b9b0ce8 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -128,16 +128,16 @@ public:
private:
enum {
- FIRST_TEST = 0,
- UPDATE_TEST,
- CONFIGURE_TEST,
- BUILD_TEST,
- TEST_TEST,
- COVERAGE_TEST,
- PURIFY_TEST,
- SUBMIT_TEST,
- ALL_TEST,
- LAST_TEST
+ FIRST_TEST = 0,
+ UPDATE_TEST = 1,
+ CONFIGURE_TEST = 2,
+ BUILD_TEST = 3,
+ TEST_TEST = 4,
+ COVERAGE_TEST = 5,
+ PURIFY_TEST = 6,
+ SUBMIT_TEST = 7,
+ ALL_TEST = 8,
+ LAST_TEST = 9
};
struct cmCTestTestResult
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index 256c255..ffc567b 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -72,6 +72,7 @@ int main (int argc, char *argv[])
str == "Continuous" )
{
inst.SetTestModel(cmCTest::CONTINUOUS);
+ std::cout << "Continuous" << std::endl;
}
else
{