Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Run a plugin test with a 'just-built' product

Hi,

I'm currently struggling to get a plugin test to run inside an installed product that is being built before the test-plugin. I've setup the test-plugin's pom according to the testRuntime docs of the surefire plugin at: http://www.eclipse.org/tycho/sitedocs/tycho-surefire/tycho-surefire-plugin/test-mojo.html#testRuntime (see the end of the mail for the complete pom.xml)

The product itself builds fine, but when the p2 directory tries to install it in the test-plugins work/ directory it fails to figure out where the binary artefacts (launcher executable) are and complains with:

!ENTRY org.eclipse.equinox.p2.engine 4 4 2014-06-26 18:30:10.919
!MESSAGE An error occurred while collecting items to be installed
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2014-06-26 18:30:10.919
!MESSAGE session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). !SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 0 2014-06-26 18:30:10.919 !MESSAGE No repository found containing: binary,com.froglogic.squish.ide.product.executable.gtk.linux.x86,5.2.0

The commandline arguments passed to the p2 directory are:
[-metadataRepository, file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.core.tests/target/,file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.core.tests/target/targetPlatformRepository/,file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.core.tests/target/p2temp/additionalBundles/, -artifactRepository, file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.core.tests/target/,file:/resolution-context-artifacts@/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.core.tests,file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.core/target/,file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.library/target/,file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.core.tests/target/,file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.debug/target/,file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.dltk/target/,file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.ui/target/,file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.dltk.js.ui/target/,file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.dltk.ruby.ui/target/,file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.dltk.tcl.ui/target/,file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish. epic.ui/target/,file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.ide/target/,file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.pydev.ui/target/,file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.ide.product.feature/target/,file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.widgets/target/,file:/home/andreas/.m2/repository/,file:/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.core.tests/target/p2temp/additionalBundles/, -installIU, com.froglogic.squish.core.tests,org.eclipse.tycho.surefire.osgibooter,org.eclipse.tycho.surefire.junit4,com.froglogic.squish.ide.product, -destination, /home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.core.tests/target/work, -profile, DefaultProfile, -profileProperties, org.eclipse.update.install.features=true, -roaming, -p2.os, linux, -p2.ws, gtk, -p2.arch, x86]

Any hints how to debug this further or any idea how to fix this?

The reason for doing this in the first place is that the product includes a plugin_customization.ini file that changes certain default settings in the product that the tests are written for. So without that file the tests fail since the expectations have been written in a way that these customizations are taken into account.

If there's a different way of getting these preference customizations applied during the test execution I'd be grateful for a hint for that too as it would also speed up the whole test setup.

The test-plugin's pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"; xmlns="http://maven.apache.org/POM/4.0.0";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.froglogic.squish.releng</groupId>
        <artifactId>parent</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <relativePath>../com.froglogic.squish.releng/</relativePath>
    </parent>
    <groupId>com.froglogic.squish.releng</groupId>
    <artifactId>com.froglogic.squish.core.tests</artifactId>
    <version>1.5.0-SNAPSHOT</version>
    <packaging>eclipse-test-plugin</packaging>
    <build>
    <plugins>
        <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>tycho-surefire-plugin</artifactId>
            <version>${tycho-version}</version>
            <configuration>
                <testRuntime>p2Installed</testRuntime>
                <product>com.froglogic.squish.ide.product</product>
<application>com.froglogic.squish.ide.application</application>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>target-platform-configuration</artifactId>
            <version>${tycho-version}</version>
            <configuration>
                <dependency-resolution>
                    <extraRequirements>
                        <!-- product IU under test -->
                        <requirement>
                            <type>p2-installable-unit</type>
                            <id>com.froglogic.squish.ide.product</id>
                            <versionRange>0.0.0</versionRange>
                        </requirement>
                    </extraRequirements>
                </dependency-resolution>
<!-- this is needed to avoid the install bailing out due to https://bugs.eclipse.org/bugs/show_bug.cgi?id=387701 -->
                <executionEnvironment>JavaSE-1.6</executionEnvironment>
            </configuration>
        </plugin>
    </plugins>
</build>
</project>

Andreas

--
Andreas Pakulat squish@xxxxxxxxxxxxx
froglogic GmbH - Automated UI and Web Testing


Back to the top