[CMake] Integrating cmake into eclipse: running test cases from gui?
Alexander Neundorf
a.neundorf-work at gmx.net
Wed Oct 26 15:09:35 EDT 2011
On Wednesday 26 October 2011, Dan Kegel wrote:
> On Wed, Oct 26, 2011 at 6:18 PM, Alexander Neundorf
>
> <a.neundorf-work at gmx.net> wrote:
> > It would be nice if you could give cmake from current git master a try. I
> > have put some more work into it, and now you should get also a virtual
> > folder containing all targets (each with a Build and a Clean target) and
> > their associated source files.
>
> OK, I'll see if I can try that out.
>
> >> Next question: how does one trigger "make test" from eclipse?
> >> In the java world, I think a plugin is used to do that.
> >> (
> >> http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.jdt.doc.us
> >> er %2FgettingStarted%2Fqs-junit.htm )
> >> Is there a corresponding plugin for cmake? It oughtta be pretty
> >> simple... all it has to do is add a "run tests" button somewhere.
> >
> > No idea how that works/could work with a cmake-generated project file.
> >
> >> It might be nice to have that button let you select
> >> which tests to run, but I'd settle for one that ran all tests.
> >
> > Not quite sure, but the "test" target should be added as a target which
> > can be executed. Are you sure it's not there ?
>
> There is one executable for each project's tests.
> What if I want to run all tests?
Double click the "test" target in the top level directory of the "Makefile
targets" view.
It seems there is only a "test" target created in the top level directory, it
may make sense to create it also in the subdirectories, so you can run also
subgroups of the tests.
> That's a lot of
> clicking around to find all those project's test executables.
So, it's basically the other way round.
> In Java, there's a plugin that lists all the tests, and lets you run
> one or all a bit more conveniently
> http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.pde.doc.user%
> 2Fguide%2Ftools%2Flaunchers%2Fjunit_test.htm
>
> For now, I guess I can just tell developers to open a shell and do
> "make test" by hand if they want to run all the tests, but that's kind
> of a cop-out.
As I wrote above, there is a makefile-target they can click in Eclipse.
What does not exist, but what might be nice, is something which provides the
flexibility of ctest within Eclipse, e.g. run only tests which match some
regexp, etc.
Maybe this would have to be done as Eclipse plugin ?
Alex
More information about the CMake
mailing list