Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Understanding how Tycho Resolves the Target Platform used for UI JUnit Tests in Multi-Module Builds

You should see Tigerstripe in config.ini in th osgi.bundles entry.
If not, then it's likely Tigerstripe must be added as a dependency to your test plugin

Jeff

On Fri, Apr 10, 2015 at 10:41 PM, Daniel Johnson (danijoh2) <danijoh2@xxxxxxxxx> wrote:
Hey Jeff,

That is what I find odd, is the config.ini is completely empty except the build timestamp. Under test-plugin/target/work/configuration/config.ini. What is supposed to be configuring the config.ini file?

The Tigerstripe plugin resolves fine, because my source code compiles fine against it and my unit test code executes fine against it, but the target platform used for the UI test harness does not seem to contain it.

Thanks,
Daniel



>Date: Fri, 10 Apr 2015 22:01:04 +0200
>From: Jeff MAURY <jeffmaury@xxxxxxxxxxxxx>
>To: Tycho user list <tycho-user@xxxxxxxxxxx>
>Subject: Re: [tycho-user] Understanding how Tycho Resolves the Target
>       Platform used for UI JUnit Tests in Multi-Module Builds
>Message-ID:
>       <CANyrOm4vbFhh7NYQjfhKXVuhLucXqWqdxwMtKKJEmA_DRV9z7g@xxxxxxxxxxxxxx>
>Content-Type: text/plain; charset="utf-8"
>
>What kind of error do you have. If Tigerstripe was not in your target
>platform, then Tycho resolution would fail.
>Can you check in config.ini if Tigerstripe is listed in the osgi bundles.
>
>Regards
>Jeff
>
>On Fri, Apr 10, 2015 at 9:33 PM, Daniel Johnson (danijoh2) <
>danijoh2@xxxxxxxxx> wrote:
>
>>  Hi,
>>
>>  I am trying to understand how (when an eclipse-test-plugin configured to
>> run UI Tests is invoked) Tycho resolves the target platform plugins to be
>> used in the tests. I am running against Eclipse Luna with Tycho 0.22.
>>
>>  I have a multi-module build, such as:
>> pom.xml (top level build and parent pom)
>> - plugins
>> - - com.cisco.<pluginX>
>> - - com.cisco.<pluginY>
>> - - com.cisco.<pluginY>.ui
>> - - com.cisco.<pluginZ>
>> - - com.cisco.<pluginZ>.test
>> - features
>> - - ...
>> - site
>> - - ?
>>
>>  When I run the build from the top level, everything compiles just fine,
>> features and update site are built without problem, and most tests run just
>> fine. However, I have one UI test that relies on behavior of Tigerstripe
>> which fails with such an error that I am lead to believe Tigerstripe is not
>> part of the target platform. Both my source code and test code depends on
>> Tigerstripe, and both compile and build fine. When I run the test as a
>> JUnit Plugin within my workbench the test runs and passes as I expected,
>> but when invoked by Tycho it fails.
>>
>>  The test plugin has about a dozen dependencies listed in the Manifest as
>> Required Plugins.
>> I have:
>> org.eclipse.equinox.ds (read some posts that suggested adding this, so
>> decided to try it)
>> org.eclipse.equinox.event (for errors being shown in the test workbench
>> .log related to Eclipse 4.4)
>> org.eclipse.core.runtime
>> org.eclipse.ui
>> org.junit
>> org.eclipse.m2e.archetype.common
>> org.eclipse.tigerstripe.workbench.base
>> And finally several com.cisco.<plugin*> references, 2 which come from P2
>> update sites, and 6 from the build itself.
>>
>>  I added -DdebugPort=5005 and paused the test execution to inspect the
>> com.cisco.<plugin>.test/target folder when the test is invoked. I found a
>> few interesting things, but I am not really sure how to interpret the
>> information.
>>
>>  First off, I found that the target/work/configuration/config.ini file
>> only contains a comment with the build timestamp:
>> #Fri Apr 10 12:13:19 PDT 2015
>>
>>  Second, I found that the target/work/plugins directory only contains a
>> small subset of the required plugins that were listed in the manifest of
>> the test project:
>>  drwxr-xr-x   8 danijoh2  staff  272 Apr 10 12:13
>> com.cisco.xmp.<plugin1>_1.2.71.201504101202 (from P2 site)
>> drwxr-xr-x   9 danijoh2  staff  306 Apr 10 12:13
>> com.cisco.xmp.<plugin2>_1.2.71.201504101202 (from P2 site)
>> drwxr-xr-x  10 danijoh2  staff  340 Apr 10 12:13
>> org.eclipse.jdt.debug_3.8.102.v20150115-1323
>> drwxr-xr-x  16 danijoh2  staff  544 Apr 10 12:13
>> org.eclipse.m2e.archetype.common_1.5.1.20150109-1819
>> drwxr-xr-x  11 danijoh2  staff  374 Apr 10 12:13
>> org.eclipse.m2e.maven.indexer_1.5.1.20150109-1819
>> drwxr-xr-x   8 danijoh2  staff  272 Apr 10 12:13
>> org.eclipse.m2e.maven.runtime.slf4j.simple_1.5.1.20150109-1819
>> drwxr-xr-x   7 danijoh2  staff  238 Apr 10 12:13
>> org.eclipse.m2e.maven.runtime_1.5.1.20150109-1819
>>
>>  I was expecting to see the com.cisco.<pluginX/Y/Z>,
>> org.eclipse.tigerstripe.workbench.base, and org.eclipse.equinox.* plugins
>> listed in this directory, or somehow otherwise referenced by the
>> config.ini, but there is nothing.
>>
>>  My top level POM is configured with tycho-maven-plugin
>> (source/target=1.6), tycho-compiler-plugin, tychco-packaging-plugin
>> (strictVersions=false), tycho-source-plugin (plugin-source goal), and the
>> target-platform-configuration is:
>>
>>  <plugin>
>>   <groupId>org.eclipse.tycho</groupId>
>>   <artifactId>target-platform-configuration</artifactId>
>>   <version>0.22.0</version>
>>     <configuration>
>>     <executionEnvironment>JavaSE-1.6</executionEnvironment>
>>     <resolver>p2</resolver>
>>     <environments>
>>       <environment>
>>         <os>linux</os>
>>         <ws>gtk</ws>
>>         <arch>x86_64</arch>
>>       </environment>
>>       <environment>
>>          <os>linux</os>
>>          <ws>gtk</ws>
>>          <arch>x86</arch>
>>        </environment>
>>        <environment>
>>          <os>macosx</os>
>>          <ws>cocoa</ws>
>>          <arch>x86_64</arch>
>>        </environment>
>>        <environment>
>>          <os>win32</os>
>>          <ws>win32</ws>
>>          <arch>x86</arch>
>>        </environment>
>>        <environment>
>>          <os>win32</os>
>>          <ws>win32</ws>
>>          <arch>x86_64</arch>
>>        </environment>
>>     </environments>
>>   </configuration>
>> </plugin>
>>
>>  My test project POM is configured with the tycho-surefire-plugin:
>>  <build>
>>   <plugins>
>>     <plugin>
>>       <groupId>org.eclipse.tycho</groupId>
>>       <artifactId>tycho-surefire-plugin</artifactId>
>>       <configuration>
>>         <useUIHarness>true</useUIHarness>
>>         <argLine>${junit.args}</argLine>
>>       </configuration>
>>     </plugin>
>>   </plugins>
>> </build>
>>
>>  Any help offered in getting my tests to run with the correct target
>> platform configuration is greatly appreciated!
>>
>>  Thanks,
>> Daniel
>>
>> _______________________________________________
>> tycho-user mailing list
>> tycho-user@xxxxxxxxxxx
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/tycho-user
>>
>
>
>
>--
>Jeff MAURY
>
>
>"Legacy code" often differs from its suggested alternative by actually
>working and scaling.
> - Bjarne Stroustrup
>
>http://www.jeffmaury.com
>http://riadiscuss.jeffmaury.com
>http://www.twitter.com/jeffmaury
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL: <https://dev.eclipse.org/mailman/private/tycho-user/attachments/20150410/a91baee4/attachment.html>
>
>------------------------------
>
>Message: 2
>Date: Fri, 10 Apr 2015 22:23:08 +0200
>From: Jeff MAURY <jeffmaury@xxxxxxxxxxxxx>
>To: Tycho user list <tycho-user@xxxxxxxxxxx>
>Subject: Re: [tycho-user] tycho.mode=maven and tycho-packaging-plugin
>Message-ID:
>       <CANyrOm49hrq-zQFzNCbM9-AKMYuVAvoeXkKr=EDkMhRo3+1vkw@xxxxxxxxxxxxxx>
>Content-Type: text/plain; charset="utf-8"
>
>Can't find the documentation about tycho.mode but my guess is that
>tycho.mode=maven will transform the tycho resolution process to a NOP but
>if your Maven artifact is a tycho one then it's likely Tycho plugins will
>be invoked because they are defined in the corresponding packaging.
>
>Regards
>Jeff
>
>On Fri, Apr 10, 2015 at 6:19 PM, Aur?lien Pupier <
>aurelien.pupier@xxxxxxxxxxxxxx> wrote:
>
>> Hi,
>>
>> I'm trying to launch a maven build in Maven mode (mvn clean
>> generate-resources -Dtycho.mode=maven)
>> Unfortunately, it is failing with the following error:
>>
>> Failed to execute goal
>> org.eclipse.tycho:tycho-packaging-plugin:0.21.0:build-qualifier
>> (default-build-qualifier) on project
>> org.bonitasoft.studio.repository.themes.bonitasoft: *Execution
>> default-build-qualifier of goal
>> org.eclipse.tycho:tycho-packaging-plugin:0.21.0:build-qualifier failed:
>> Project has not been setup yet MavenProject:*
>> org.bonitasoft.studio.bundles.plugins:org.bonitasoft.studio.repository.themes.bonitasoft:7.0.0-SNAPSHOT
>> @
>> C:\install\oomphBased\studio-150403-1714\git\bonita-studio\bundles\plugins\org.bonitasoft.studio.repository.themes.bonitasoft\pom.xml
>> -> [Help 1]
>>
>> Even if packaging of artefact is eclipse-plugin, I didn't expect having
>> the tycho-packaging-plugin to be executed in Maven mode, am I wrong, is it
>> a bug or did I miss some configuration?
>>
>> Thanks for any help
>>
>> --
>> *Aurelien Pupier  <https://fr.linkedin.com/in/aurelienpupier>*
>> *R&D Engineer, BonitaBPM Studio Development Leader*
>> aurelien.pupier@xxxxxxxxxxxxxx
>> apupier <http://twitter.com/apupier>
>> 32, rue Gustave Eiffel - 38000 Grenoble, France
>> Download Bonita BPM
>> <http://www.bonitasoft.com/landing/lp/direct-download?utm_source=bonitasoft_email_signature&utm_medium=email&utm_content=email_signature&utm_campaign=email_signature>
>>  | Access BPM Quick Start Center
>> <http://www.bonitasoft.com/landing/lp/quick-start-center?utm_source=bonitasoft_email_signature&utm_medium=email&utm_content=email_signature&utm_campaign=email_signature>
>>    <http://www.bonitasoft.com/> <http://twitter.com/bonitasoft>
>> <https://www.facebook.com/bonitasoftbpm>
>> <http://www.linkedin.com/groups?gid=3182097>
>> <http://www.slideshare.net/BonitaSoft> <http://www.youtube.com/bonitasoft>
>> <http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=128> This message and
>> any attachment (the "message") is intended solely for the addressees and is
>> confidential. If you receive this message by mistake, please delete it and
>> notify the sender immediately. Any use not in accordance with its purpose,
>> any out-spread or disclosure, either as a whole or partially, is prohibited
>> except with formal approval. Internet cannot guarantee the integrity of
>> this message, therefore Bonitasoft will not be liable for the message if
>> modified.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> tycho-user mailing list
>> tycho-user@xxxxxxxxxxx
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/tycho-user
>>
>
>
>
>--
>Jeff MAURY
>
>
>"Legacy code" often differs from its suggested alternative by actually
>working and scaling.
> - Bjarne Stroustrup
>
>http://www.jeffmaury.com
>http://riadiscuss.jeffmaury.com
>http://www.twitter.com/jeffmaury
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL: <https://dev.eclipse.org/mailman/private/tycho-user/attachments/20150410/a51e42e6/attachment.html>
>
>------------------------------
>
>_______________________________________________
>tycho-user mailing list
>tycho-user@xxxxxxxxxxx
>To change your delivery options, retrieve your password, or unsubscribe from this list, visit
>https://dev.eclipse.org/mailman/listinfo/tycho-user
>
>End of tycho-user Digest, Vol 56, Issue 5
>*****************************************



--
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury

Back to the top