Community
Participate
Working Groups
Created attachment 245692 [details] sample projects Following up on Bug 433522 (and I apologize for not further testing this next logical step after confirming the fix made in that bug), I'm having trouble with running unit tests with eclipse-test-plugin when a dependency (either Fragment-Host or Require-Bundle) has a p2.inf requirement (in my case one that is provided by a platform fragment bundle). The validate, compile, and package goals are working. But when running the verify goal, if all the projects are in a single reactor, then tycho-surefire fails with unresolved dependencies. If I instead run one maven reactor to insatll host, fragment, and consumer projects and then a second maven reactor to verify the test projects, it works. I've updated the sample project from 433522 and added a tests project which is a fragment of the host bundle, a consumer project that depends on the host bundle, and a consumer.tests project which is a fragment of the consumer bundle. Running these commands: mvn -Dplatform=linux64 package -fae -Ptests mvn -Dplatform=linux64 verify -fae -Ptests The second will show com.lgc.example.host.tests and com.lgc.example.consumer.tests fail like this [ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.21.0:test (default-test) on project com.lgc.example.host.tests: Execution default-test of goal org.eclipse.tycho:tycho-surefire-plugin:0.21.0:test failed: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from com.lgc.example.host 1.0.0.201408041940 to com.lgc.example.linux.gtk.x86_64 [1.0.0.0,1.1.0).; No solution found because the problem is unsatisfiable.] -> [Help 1] [ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.21.0:test (default-test) on project com.lgc.example.consumer.tests: Execution default-test of goal org.eclipse.tycho:tycho-surefire-plugin:0.21.0:test failed: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from com.lgc.example.host 1.0.0.201408041940 to com.lgc.example.linux.gtk.x86_64 [1.0.0.0,1.1.0).; No solution found because the problem is unsatisfiable.] -> [Help 1] [ERROR] Followed with these commands mvn -Dplatform=linux64 install mvn -Dplatform=linux64 verify -Dreactor=tests The tests will now succeed.
Thanks for the minimal example project demonstrating the problem. Debugging the problem made me find this tiny but important typo in the code: https://git.eclipse.org/r/#/c/31553/
(In reply to comment #1) > https://git.eclipse.org/r/#/c/31553/ I've also added an integration test which covers the scenario where a host plug-in ensures that the appropriate fragment is installed. It also includes a consumer, whose resolution fails without the bugfix.
The fix is submitted [1] @Justin: Thanks again for this very good bug report! [1] http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/commit/?id=130a8dd40a12998445d99eb689b885016ce27b3d