> On Fri, Jan 20, 2012 at 2:07 AM, Rolf Eike Beer <[email protected]> wrote: >> Bill Hoffman wrote: >>> We seems to have some valgrind errors on the dashboard: >>> >>> http://www.cdash.org/CDash/viewDynamicAnalysisFile.php?id=2554459 >>> >>> Seems to have started with this day: >>> http://www.cdash.org/CDash/viewChanges.php?project=CMake&date=2011-11-12 >>> >>> http://www.cdash.org/CDash/viewUpdate.php?buildid=1717708 >>> >>> I think it might be this find module change that has exposed the issue: >>> >>> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f30f9a500c5e5aeb053c41307 >>> dab9987735570dd >>> >>> Looks like the status is somehow not getting set for a call to message. >> >> While the reason for this occurrence has been long fixed, I just pushed >> the >> topic "uninitialized-var-in-if" into next that fixed the underlying >> problem. >> >> 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". Eike -- 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
