David Cole wrote:
> On Fri, Jan 20, 2012 at 7:51 AM, Rolf Eike Beer <[email protected]> wrote:
> >> On Fri, Jan 20, 2012 at 2:07 AM, Rolf Eike Beer <[email protected]> wrote:

>>>> This introduced a new directory Tests/Syntax and a first tests
>>>> there. It does
>>>> 
>>>>  if (NOT foo bar STREQUAL "foo bar")
>>>> 
>>>> and triggers this error, which now does not use an unitinialized 
>>>> variable anymore. Since it's a clear syntax error I set it to be a
>>>> FATAL_ERROR. I think we should put more such tests in there, would easily
>>>> allow us to increase coverage as e.g. in cmIfCommand many error branches
>>>> are currently not part of the coverage.
>>> 
>>> Instead of inventing an entirely new location for this one line
>>> case...... it should be added in "Tests/CMakeTests" -- there are a
>>> bunch of tests of syntax-related mistakes in there.
>>> 
>>> See, for example, the files FileTestScript.cmake and
>>> StringTestScript.cmake.
>>> 
>>> The macro execute_all_script_tests actually parses such scripts and
>>> uses the "# pass" / "# fail" comments to know whether a given
>>> if/elseif clause is expected to pass or fail.
>>> 
>>> The one thing it can't handle though, is mismatched if's, ...
>>> 
>>> However, regardless of whether you can blend in with an existing test
>>> or not, I think "Tests/CMakeTests" is the right location for further
>>> CMake syntax related tests.
>> 
>> I'll happily move this to any place where it fits.
>> 
>> Is there any documentation on how these testcases should be structured?
>> I currently only see a lot of tests, but nothing like a readme file telling
>> me things like "if your script does only a cmake configure run but
>> nothing more CMakeOnly is the place you look for".

> No documentation about tests. Discussion on this list is the closest
> proxy for such docs.

What I currently know is:

-if tests run in CMake script mode, they should go in CMakeTests
-if they need to run CMake in configure mode, but don't build anything, they 
should go in CMakeOnly
-if they test something from the Modules directory, but do not belong to one 
of the previous 2 cases, they should go in Modules

Correct? Anything else?

Where should such a list go? Tests/README? Wiki?

Eike

Attachment: signature.asc
Description: This is a digitally signed message part.

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to