Skip to main content

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

Hey everyone,

I'm using tycho to build and test some eclipse plugins. I have one bundle that has many platform specific fragments. I also have one test bundle that is using tycho-surefire-plugin to test the original bundle that has the platform specific fragments. However, tycho is not including the current platform's fragment into the test runtime.

All of the platform specific fragments look like the win64 fragment manifest listed below (there are actually 6 total fragments, one for each platform combination I need to support.)

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Liferay AUI Upgrade Tool Win64
Bundle-SymbolicName: com.liferay.laut.win32.win32.x86_64;singleton:=true
Bundle-Version: 1.0.2.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Fragment-Host: com.liferay.ide.alloy.core
Eclipse-BundleShape: dir
Eclipse-PlatformFilter: (& (osgi.ws=win32)(osgi.os=win32)(osgi.arch=x86_64))
Bundle-Vendor: Liferay, Inc.

Example win64 Fragment pom.xml's section

<build>
    <plugins>
        <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>target-platform-configuration</artifactId>
            <configuration>
                <resolver>p2</resolver>
                <environments>
                    <environment>
                        <os>win32</os>
                        <ws>win32</ws>
                        <arch>x86_64</arch>
                    </environment>
                </environments>
            </configuration>
        </plugin>
    </plugins>
</build>

When I try to execute my tycho build and it runs the surefire test plugin (no matter which OS I try), the correct platform fragment is not added into the runtime.

Any ideas?  

I've seen various posts on stackoverflow about similar questions but in those cases the fragments loaded into the test runtime were not platform-specific fragments with OS filters.

I've attached an example multi-module project the demonstrates the problem. 

After you run the test if you look at the bundles that are started by surefire it doesn't include the example.bundle.win32.win32.x86_64 fragment if you are on windows or the example.bundle.linux.gtk.x86_64 fragment if you are on linux.  

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

Attachment: tycho-test-runtime.zip
Description: Zip archive


Back to the top