How to let Buckminster determine additional bundles? [message #1062326] |
Fri, 07 June 2013 08:37 |
Axel Guckelsberger Messages: 354 Registered: July 2009 |
Senior Member |
|
|
Hi all,
I am currently overhauling my continuous integration builds to have separate
jobs for different components. Each component job should gather some
metrics, run a test suite and build and publish a feature p2 repository.
This p2 repository should then be used by subsequent jobs.
The component which should be processed first is the EMF-based meta model.
The job for this pulls the corresponding git repository. After that the
following bundles are in the (Jenkins) workspace:
org....metamodel (EMF model plug-in)
org....metamodel.edit (EMF edit plug-in)
org....metamodel.tests (tests plug-in)
org....metamodel.build (build/releng feature, includes component feature)
org....metamodel.feature (component feature)
The idea is to build the build feature so that the resulting P2 repository
contains the actual component feature.
Important: the component feature includes only the metamodel and
metamodel.edit bundles - not the tests plug-in!
The first action the job performs is resolving a cquery like this:
<cq:componentQuery xmlns:cq="http://www.eclipse.org/buckminster/CQuery-1.0" resourceMap="my.rmap">
<cq:rootRequest name="org....metamodel.build" componentType="eclipse.feature"/>
<cq:advisorNode namePattern="^org\....\.metamodel.*\.source$" skipComponent="true"/>
</cq:componentQuery>
After that it calls the EMF ant plugin to generate EMF classes from the
model (for the model and edit plug-ins). Then some metrics are collected
using common inspection tools, like Checkstyle. Works all fine.
My problem occurs when it comes to running a test suite. I placed some
example tests inside the tests bundle using Jnario. This tests bundle
contains a file named AllTests.launch which refers to the test suite which
has been specified and generated by Jnario.
Jenkins console shows this error message:
Cannot open launch config from org....metamodel.tests/AllTests.launch
I found a forum post about this problem at
http://www.eclipse.org/forums/index.php/mv/msg/207829/780302/#msg_780302
Having read this, I guess that while the tests plug-in is part of the
Jenkins workspace, this doesn't necessarily mean that it is also recognised
by Buckminster. However, shouldn't the cquery shown above include this plug-
in, too?
I tried to add the tests plug-in as dependency to the buckminster.cspex file
of the build feature, but this did not change anything.
Do you have an idea what I need to do in order to let Buckminster detect it
properly?
Thanks in advance!
Axel
[Updated on: Fri, 07 June 2013 08:42] Report message to a moderator
|
|
|
Re: How to let Buckminster determine additional bundles? [message #1062540 is a reply to message #1062326] |
Sat, 08 June 2013 14:09 |
|
Hi Alex
see comments below
On 06/07/2013 10:37 AM, Axel Guckelsberger wrote:
> The component which should be processed first is the EMF-based meta model.
> The corresponding job pulls the corresponding git repository. After that the
> following bundles are in the (Jenkins) workspace:
>
> org....metamodel (EMF model plug-in)
> org....metamodel.edit (EMF edit plug-in)
> org....metamodel.tests (tests plug-in)
> org....metamodel.build (build/releng feature)
> org....metamodel.feature (component feature)
>
> The idea is to build the build feature so that the resulting P2 repository
> contains the actual component feature.
> Important: the component feature includes only the metamodel and
> metamodel.edit bundles - not the tests plug-in!
>
> The first action the job performs is resolving a cquery like this:
>
> <cq:componentQuery xmlns:cq="http://www.eclipse.org/buckminster/CQuery-1.0"
> resourceMap="my.rmap">
> <cq:rootRequest name="org....metamodel.build"
> componentType="eclipse.feature"/>
> <cq:advisorNode namePattern="^org\....\.metamodel.*\.source$"
> skipComponent="true"/>
> </cq:componentQuery>
>
> After that it calls the EMF ant plugin to generate EMF classes from the
> model (for the model and edit plug-ins). Then some metrics are collected
> using common inspection tools, like Checkstyle. Works all fine.
>
> My problem occurs when it comes to running a test suite. I placed some
> example tests inside the tests bundle using Jnario. This tests bundle
> contains a file named AllTests.launch which refers to the test suite which
> has been specified and generated by Jnario.
>
> Jenkins console shows this error message:
>
> Cannot open launch config from org....metamodel.tests/AllTests.launch
>
> I found a forum post about this problem at
> http://www.eclipse.org/forums/index.php/mv/msg/207829/780302/#msg_780302
>
> Having read this, I guess that while the tests plug-in is part of the
> Jenkins workspace, this doesn't necessarily mean that it is also recognised
> by Buckminster. However, shouldn't the cquery shown above include this plug-
> in, too?
exactly: "part of Jenkins workspace" does not imply "part of Buckminster
workspace" (i.e., an Eclipse workspace).
The cquery will import the tests plugin in the workspace only if there's
some components which depends on it...
>
> I tried to add the tests plug-in as dependency to the buckminster.cspex file
> of the build feature, but this did not change anything.
>
This at least will make buckminster import the test plugin project in
the workspace... you should see a message about that...
> Do you have an idea what I need to do in order to let Buckminster detect it
> properly?
the problem might be in the command that you use to run the Junit tests
with buckminster... when you run
junit -l <name>/<launch configuration>
<name> is NOT a filesystem path: it is the name of the component (i.e.,
project) which must be imported in the workspace. Note that the name of
the project (bundle) might differ from its actual directory name...
hope this helps
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
|
Powered by
FUDForum. Page generated in 0.03359 seconds