View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009128CMakeCTestpublic2009-06-10 02:372016-06-10 14:30
ReporterMaik Beckmann 
Assigned ToBill Hoffman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0009128: [Fortran] --output-on-failure option doesn't work with FAIL_REGULAR_EXPRESSION
DescriptionRunning
  ctest --output-on-failure
doesn't work for programs which returns 0, but fail because FAIL_REGULAR_EXPRESSION matches.

This hits Fortran programs which have no return value.
Steps To Reproduceunpack the attached
  ctest_fortran_test.tar.gz
configure, build it and run
  /path/to/cvs/ctest --output-on-failure
Additional InformationThe code which handles this option is in
  cmCTest.cxx
{{{
  int cmCTest::RunTest(std::vector<const char*> argv,
                     std::string* output, int *retVal,
                     std::ostream* log, double testTimeOut,
                     std::vector<std::string>* environment)
{
...
    *retVal = cmsysProcess_GetExitValue(cp);
    if(*retVal != 0 && this->OutputTestOutputOnTestFailure)
      {
        OutputTestErrors(tempOutput);
      }
    }
  else if(result == cmsysProcess_State_Exception)
    {
    if(this->OutputTestOutputOnTestFailure)
      {
        OutputTestErrors(tempOutput);
      }
...
}}}

Value of FAIL_REGULAR_EXPRESSION is evaluated in
  cmCTestTestHandler.cxx: cmCTestTestHandler::ProcessHandler()
which calls cmCTest::RunTest.

So the logic of output-on-failure might be better placed in cmCTestTestHandler::ProcessHandler()
TagsNo tags attached.
Attached Filesgz file icon ctest_fortran_test.tar.gz [^] (422 bytes) 2009-06-10 02:37
patch file icon ctest_output_on_failure.patch [^] (2,614 bytes) 2009-06-10 03:18 [Show Content]

 Relationships

  Notes
(0016685)
Maik Beckmann (reporter)
2009-06-10 03:21

ctest_output_on_failure.patch moves the logic that handles
  --output-on-failure
from cmCTest.cxx to cmCTestTestHander.cxx

-- Maik
(0016686)
Maik Beckmann (reporter)
2009-06-10 03:51

narf, in the patch

+ bool GetOutputTestOutputOnTestFailure()
+ { return this->OutputTestOutputOnTestFailure; }

should be

+ bool GetOutputTestOutputOnTestFailure() const
+ { return this->OutputTestOutputOnTestFailure; }

for the sake of const correctness

-- Maik
(0016826)
Maik Beckmann (reporter)
2009-07-07 15:43

ping
(0041568)
Kitware Robot (administrator)
2016-06-10 14:27

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2009-06-10 02:37 Maik Beckmann New Issue
2009-06-10 02:37 Maik Beckmann File Added: ctest_fortran_test.tar.gz
2009-06-10 03:18 Maik Beckmann File Added: ctest_output_on_failure.patch
2009-06-10 03:21 Maik Beckmann Note Added: 0016685
2009-06-10 03:51 Maik Beckmann Note Added: 0016686
2009-06-10 09:01 Bill Hoffman Status new => assigned
2009-06-10 09:01 Bill Hoffman Assigned To => Bill Hoffman
2009-07-07 15:43 Maik Beckmann Note Added: 0016826
2016-06-10 14:27 Kitware Robot Note Added: 0041568
2016-06-10 14:27 Kitware Robot Status assigned => resolved
2016-06-10 14:27 Kitware Robot Resolution open => moved
2016-06-10 14:30 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team