[CMake] Need advice for unit test structure

Michael Jackson mike.jackson at bluequartz.net
Thu Apr 2 23:13:03 EDT 2009


On Apr 2, 2009, at 11:04 PM, Philip Lowman wrote:

> On Thu, Apr 2, 2009 at 5:07 PM, Robert Dailey <rcdailey at gmail.com>  
> wrote:
> If there was some way for CMake to utilize "solution folders" in  
> Visual Studio, we could easily organize unit tests into a hierarchy.  
> This way the solution explorer would not be cluttered and we'd still  
> be able to have 1 project per unit test.
>
> Never heard of unit tests that fail to compile before as a condition  
> for success... I'm curious what kinds of things these could be used  
> for?
>
> Is there support for grouping projects in folders in Visual Studio?   
> If not it could be added to VS.  If it is supported in VS you could  
> send in a patch to make it work with CMake or at the very list  
> request a feature.
>
> Regarding the compile time tests, you could keep them separate but  
> not enable them by default in your daily builds, just your nightly  
> regression tests.
>
> You could also make them "zzz_test_foo" compile time tests so they  
> show up at the bottom of the list of projects where you'll never see  
> them.  The PROJECT_LABEL target property should help with this.
>
>
> -- 
> Philip Lowman

Boost does that sort of thing, having a failed compile actually mean  
the test _passes_. I believe boost has a python script that drives the  
test. I think there was some traffic on the list last month about  
something in CTest where you could do a "compile-and-test" test.

    Hope that helps

Mike Jackson


More information about the CMake mailing list