Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] run integration tests against multiple target platforms

Hi Moritz,

> I managed to use maven profiles to make target platforms interchangeable, but I’m unsatisfied with it because
> - it doesn’t allow me to have separate platforms for test-compilation and test-execution
> - it doesn’t allow me to test against all target platforms during a single execution of the build.
> 
> So… can Tycho find and run JUnit tests from an already-installed bundle?

maybe the maven-invoker-plugin [1] fits your bill? Normally, it builds
dedicated integration test projects in fresh reactors, but I think you
can shoehorn it into building the current project multiple times in
fresh reactors, each time with a different target platform set.
Previously compiled and installed projects could be re-used by setting
localRepositoryPath [2] accordingly. You just need to take care to stop
before the install phase (verify being the obvious choice), so that the
extra builds don't install stuff into your local repo.

I hope this helps as a first pointer to a solution that *might* work,
*if* you want a solution that's completely internal to Maven. If you can
afford to kick of multiple builds, why not do

  mvn clean install
  mvn clean verify -pl :your.test.project -DtargetPlaform=runtime1
  mvn clean verify -pl :your.test.project -DtargetPlaform=runtime2

This should avoid recompiling everything except for your.test.project at
least.

Hope this helps.

Andreas

[1] <http://maven.apache.org/plugins/maven-invoker-plugin/>
[2]
<http://maven.apache.org/plugins/maven-invoker-plugin/integration-test-mojo.html#localRepositoryPath>

-- 
Codetrails UG (haftungsbeschränkt)
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Mobile: +49-170-811-3791
http://www.codetrails.com/

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940


Back to the top