Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Test runtime with platform specific fragments

I've tried both ways...

            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-surefire-plugin</artifactId>
                <configuration>
<dependency-resolution>
<extraRequirements>
<requirement>
<dependency>
 <type>p2-installable-unit</type>
 <artifactId>example.fragment.win32.win32.x86_64</artifactId>
 <version>0.0.0</version>
 <optional>true</optional>
</dependency>
</requirement>
</extraRequirements>
</dependency-resolution>
                </configuration>
            </plugin>

and then also

            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-surefire-plugin</artifactId>
                <configuration>
                    <dependencies>
<dependency>
 <type>p2-installable-unit</type>
 <artifactId>example.fragment.win32.win32.x86_64</artifactId>
 <version>0.0.0</version>
 <optional>true</optional>
</dependency>
</dependencies>
                </configuration>
            </plugin>


Both don't work.  And also in the maven reactor it looks like this, so it does seem the fragments have been built previous to the test.

-------------------------------------------------------
Running example.bundle.tests.ExampleBundleTests
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.025 sec <<< FAILURE!

Results :

Tests in error:
  testFragments(example.bundle.tests.ExampleBundleTests)

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Tycho Test Runtime ................................ SUCCESS [0.061s]
[INFO] Example Bundle .................................... SUCCESS [1.234s]
[INFO] Example Fragment Linux64 .......................... SUCCESS [0.109s]
[INFO] Example Fragment Windows 64bit .................... SUCCESS [0.103s]
[INFO] Example Feature ................................... SUCCESS [0.068s]
[INFO] Example Bundle Tests .............................. FAILURE [4.146s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.471s


On Fri, Jan 3, 2014 at 10:47 PM, Mickael Istria <mistria@xxxxxxxxxx> wrote:
On 01/03/2014 03:36 PM, Greg Amerson wrote:
I tried setting up an explicit dependency to my win32 fragment since I'm trying to run the tests on windows.  But it fails with these errors:
How did you set it up? Did you use http://www.eclipse.org/tycho/sitedocs/tycho-surefire/tycho-surefire-plugin/test-mojo.html#dependencies in tycho-surefire-plugin configuration?
  <dependencies>
    <dependency>
      <type>p2-installable-unit</type>
      <artifactId>example.fragment.win32.win32.x86_64</artifactId>
      <version>0.0.0</version>
    </dependency>
  </dependencies>
should be able to resolve against current reactor. Did you also make sure that the fragment is listed in the parent pom BEFORE the test plugins (IIRC extra dependencies for surefire are still not part of the initial dependency resolution so you need to ensure dependencies have been processed at the time surefire starts).--
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user




--
Greg Amerson
Liferay Developer Tools
Liferay, Inc. www.liferay.com

Back to the top