On Thu, Sep 8, 2016 at 11:52 PM, Brad King <brad.k...@kitware.com> wrote:
> On 09/08/2016 10:15 AM, Craig Scott wrote: > > adding a DEPENDS_ON_SUCCESS test property or something similar > > which would implement the perhaps more intuitive behaviour of not > > running dependent tests when a dependee fails. If that was done, > > then implementing the "don't run fixture tests if any fixture > > setup fails" logic would be trivial. > > The semantics of this will have to be carefully though out, in > particular with respect to enabling test dependencies. Right now > ctest arguments like -E can exclude tests. What if those are > dependencies of included tests? > > I think if we introduce the notion of tests requiring other tests > then a new model of test selection and enablement needs to be > designed. Some kind of test DAG could be defined with various > roots and subgraphs being selectable an causing all reachable > tests to be included. > While I can see potential merit, I'd be reluctant to go so far as adding the complexity of a test DAG. One of the attractive things about the current functionality is its simplicity. It's relatively easy for new developers to learn how to use it and I'm keen to preserve that as much as possible, since it helps with adoption of CTest and CMake in general. Indeed, in the more general case, if we added a DEPENDS_ON_SUCCESS test property then we would have to work through how to handle situations where dependee tests were not in the initial test set to be executed. I think this might be less clear cut than I initially thought, so I'm tending to back away from this as a general feature now. For the case of test fixtures though, the semantics are very clear and would be well defined, since one of the primary purposes of fixtures is to bring in setup and cleanup tests which might not have been part of the initial test set. If no-one objects, I'll have a crack at adding the required functionality to my fixtures branch so that regular tests are skipped if setup tests fail (i.e. as per the latest set of requirements that were proposed on this list a few days ago) and I'll do so without adding a new DEPENDS_ON_SUCCESS test property. That will limit the new functionality just to fixtures where the required behaviour is well defined. -- Craig Scott Melbourne, Australia http://crascit.com
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers