[Dart] Custom error strings?
Andy Cedilnik
andy.cedilnik at kitware.com
Tue May 16 14:28:46 EDT 2006
Hi Joey,
MATCH is what the error or warning is
EXCEPTION is what the error or warning is not.
For example:
MATCH is error
EXCEPTION is errorFile.c
Now when it compiles errorFile.c it will not consider the line as error.
For * you do \\*.
Andy
Joey Mukherjee wrote:
> This looks to be exactly what I need, but a couple of questions:
>
> 1) In your view, what is the difference between these two:
>
> CTEST_CUSTOM_ERROR_MATCH Regular expression for errors during
> build process
> CTEST_CUSTOM_ERROR_EXCEPTION Regular expression for error
> exceptions during build process
>
> Should the exception mean that the build can continue, despite the
> error, while the error match means abort immediately?
>
> 2) How does one match "***"? I tried the following:
>
> SET(CTEST_CUSTOM_ERROR_MATCH
> ${CTEST_CUSTOM_ERROR_MATCH}
> "*** scons"
> )
>
> which doesn't complain, but the * in regular expressions means 0 or
> more characters so it might really not be matching what I think it
> should be matching. When running the build, I get the following:
>
> RegularExpression::compile(): Nested *?+.
> RegularExpression::compile(): Error in compile.
>
> If I do:
>
> SET(CTEST_CUSTOM_ERROR_MATCH
> ${CTEST_CUSTOM_ERROR_MATCH}
> "\*\*\* scons"
> )
>
> which I think is correct, I get the following:
>
> CMake Error: Invalid escape sequence \*
> CMake Error: Syntax error in cmake code at
> /Users/joey/sddas/src/CTestCustom.ctest:3:
> syntax error, unexpected cal_ERROR, expecting $end (2), when parsing
> string "\* scons"
> Problem reading custom configuration:
> /Users/joey/sddas/src/CTestCustom.ctest
>
>
> On May 16, 2006, at 10:11 AM, Andy Cedilnik wrote:
>
>> Hi Joey,
>>
>> Ok, now I get it. Use CTestCustom.ctest file. Please check this page:
>>
>> http://www.cmake.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest
>>
>> Andy
>>
>> Joey Mukherjee wrote:
>>
>>> The lines that I am trying to capture are really errors. Things
>>> like missing files, or weird platform oddities, or something of that
>>> nature. In each of these cases, gcc is not failing because it is
>>> not getting that far. Our build system (scons in case it matters)
>>> is what is failing. The only way I know it failed is the time that
>>> Dart displays to run the compile is unusually low. I would like
>>> ctest to realize that it had an error and submit it as a failed
>>> result and show the output when clicked like it does now with a gcc
>>> error.
>>>
>>> My DartConfiguration.tcl is as follows:
>>>
>>> SourceDirectory: /Users/joey/sddas-src/sddas/src
>>> BuildDirectory: /Users/joey/sddas-src/sddas/src
>>> Site: joeymac
>>> BuildName: MacOSX
>>> DropMethod: xmlrpc
>>> DropSite: http://elmer.space.swri.edu:8081
>>> DropLocation: SDDAS
>>> NightlyStartTime: 21:00:00 EDT
>>> ConfigureCommand: scons -c
>>> MakeCommand: scons -j2 release REAL_BUILD=1
>>> SVNCommand: /usr/local/bin/svn
>>> SVNUpdateOptions:
>>> CoverageCommand: /bin/echo
>>> TimeOut: 1500
>>>
>>> Here is how I am driving ctest:
>>>
>>> /usr/local/bin/ctest -D ${which}Start
>>> /usr/local/bin/ctest -D ${which}Configure
>>> /usr/local/bin/ctest -D ${which}Update
>>> /usr/local/bin/ctest -D ${which}Build
>>> /usr/local/bin/ctest -D ${which}Submit
>>>
>>> Right now, I am just using the combination of Dart/ctest to build
>>> our software. We are not doing any formal testing as of yet.
>>>
>>> On May 15, 2006, at 5:58 PM, Andy Cedilnik wrote:
>>>
>>>> Hi Joey,
>>>>
>>>> Are you talking about lines that are considered warnings or errors?
>>>>
>>>> Explain me how are you driving the ctest. What are the input files?
>>>> What are you testing?
>>>>
>>>> Andy
>>>>
>>>> Joey Mukherjee wrote:
>>>>
>>>>> I notice the keyword TEST everywhere. At the current moment, I am
>>>>> not doing tests. We are just compiling our software and
>>>>> submitting results to the Dart server.
>>>>>
>>>>> Is it still possible to use the FAIL_REGULAR_EXPRESSION?
>>>>>
>>>>> On May 15, 2006, at 2:51 PM, Andy Cedilnik wrote:
>>>>>
>>>>>> Hi Joey,
>>>>>>
>>>>>> Here is example DartTestfile.txt:
>>>>>>
>>>>>> # CMake generated Testfile for
>>>>>> # Source directory: /home/andy/vtk/CMake/Source/kwsys
>>>>>> # Build directory: /home/andy/vtk/CMake-bin/Tests/CTestTest/kwsysBin
>>>>>> ADD_TEST(kwsys.testRegistry
>>>>>> "/home/andy/vtk/CMake-bin/Tests/CTestTest/kwsysBin/testRegistry")
>>>>>> SET_TESTS_PROPERTIES(kwsys.testRegistry PROPERTIES
>>>>>> FAIL_REGULAR_EXPRESSION "ERROR;FAIL;Test\
>>>>>> failed" PASS_REGULAR_EXPRESSION "Test\ passed")
>>>>>> ADD_TEST(kwsys.testFail
>>>>>> "/home/andy/vtk/CMake-bin/Tests/CTestTest/kwsysBin/testFail")
>>>>>> SET_TESTS_PROPERTIES(kwsys.testFail PROPERTIES WILL_FAIL "ON")
>>>>>>
>>>>>> Looks good?
>>>>>>
>>>>>> Andy
>>>>>>
>>>>>> Joey Mukherjee wrote:
>>>>>>
>>>>>>> Two things:
>>>>>>>
>>>>>>> 1) Can we still use this if we are not using cmake? Is this
>>>>>>> something I can place in the DartConfiguration.tcl?
>>>>>>> 2) The help command in cmake I think has an error:
>>>>>>>
>>>>>>> FAIL_REGULAR_EXPRESSION: If set, if the output will match
>>>>>>> to one of
>>>>>>> specified regular expressions, the test will fail.
>>>>>>>
>>>>>>> Example: PASS_REGULAR_EXPRESSION
>>>>>>> "[^a-z]Error;ERROR;Failed"
>>>>>>>
>>>>>>> I believe the PASS should be a FAIL.
>>>>>>>
>>>>>>> This was in the 2.4.1 beta.
>>>>>>>
>>>>>>> Thanks!
>>>>>>>
>>>>>>> On May 11, 2006, at 11:49 AM, Andy Cedilnik wrote:
>>>>>>>
>>>>>>>> In CTest 2.2 and newer you can set PASS_REGULAR_EXPRESSION and
>>>>>>>> FAIL_REGULAR_EXPRESSION.
>>>>>>>>
>>>>>>>> Please run:
>>>>>>>>
>>>>>>>> cmake --help-command SET_TESTS_PROPERTIES
>>>>>>>>
>>>>>>>
>>>>>>>> Joey Mukherjee wrote:
>>>>>>>>
>>>>>>>>> Is there a way to make ctest have a custom string indicate an
>>>>>>>>> error which can then be reported by Dart?
>>>>>>>>>
>>>>>>>>> My problem is our build tool has a couple strings it prints
>>>>>>>>> out which indicate a file is missing; however, ctest/dart do
>>>>>>>>> not see this as an error so it looks like everything is fine.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> Joey
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Andy Cedilnik
>>>>>> Kitware Inc.
>>>>>>
>>>>>>
>>>>> Joey
>>>>>
>>>>
>>>>
>>>>
>>> Joey
>>>
>>
>>
>>
> Joey
>
--
Andy Cedilnik
Kitware Inc.
More information about the Dart
mailing list