Home » Modeling » TMF (Xtext) » UI Tests fail on Mac
UI Tests fail on Mac [message #1718609] |
Mon, 28 December 2015 09:48 |
|
Hi
first of all, I don't have a Mac, but I know many of you have one so you
could probably help me with UI tests failure on Mac, for one of my Xtext
project, https://github.com/LorenzoBettini/jbase (I already set
-XstartOnFirstThread when running on Mac)
A user reported UI tests failures on Mac,
https://github.com/LorenzoBettini/jbase/issues/3. The UI tests concern
content assist, workbench integration, and variable extract refactoring.
The tests that fail need the Java classpath. On the issue the complete
failure is reported, but the suspicious parts can be summarized:
ERRORS OMITTED: The type <JRE type> cannot be resolved. It is indirectly
referenced from required .class files...
java.lang.AssertionError: No such proposal: toString Found:
Loading target platform... DONE.
org.eclipse.jdt.internal.compiler.problem.AbortCompilation: Pb(324) The
type java.lang.Object cannot be resolved. It is indirectly referenced
from required .class files
Unbound classpath container: 'JRE System Library [JavaSE-1.6]' in
project 'TestProject'
The project cannot be built until build path errors are resolved
Couldn't resolve reference to JvmType 'String'.
So I guess that JRE is not picked when running UI tests. Surefire also
reports this message
objc[881]: Class JavaLaunchHelper is implemented in both
/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/bin/java
and
/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/libinstrument.dylib.
One of the two will be used. Which one is undefined.
are there any special installation configurations for Java on Mac?
many thanks in advance
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
| |
Re: UI Tests fail on Mac [message #1718626 is a reply to message #1718611] |
Mon, 28 December 2015 12:03 |
|
looks like jdt.launching.osx* is missing on the classpath
adding a dependeny to org.eclipse.jdt.launching.macosx gives an error that it is not available.
looks like the target platform config is messed up.
https://dev.eclipse.org/mhonarc/lists/tycho-user/msg06622.html
mentions a similar problem but has no solution for it
adding the plugin explicitely to the target file gives
Caused by: java.lang.IllegalStateException: org.eclipse.jdt.launching.macosx 3.3.0.v20150313-0517 cannot be installed in this environment because its filter is not applicable.
at org.eclipse.equinox.internal.p2.director.Slicer.validateInput(Slicer.java:106)
at org.eclipse.equinox.internal.p2.director.Slicer.slice(Slicer.java:57)
at org.eclipse.tycho.p2.util.resolution.AbstractSlicerResolutionStrategy.slice(AbstractSlicerResolutionStrategy.java:76)
... 29 more
(in my projects i always build against a binary built target)
i have no idea on how to fix this.
maybe the tycho mailing list is a better place to ask
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
| |
Re: UI Tests fail on Mac [message #1718632 is a reply to message #1718626] |
Mon, 28 December 2015 13:26 |
|
the following worked for me
- adapt the target-plaform-configuration places
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<environments>
</environments>
<dependency-resolution>
<extraRequirements>
<!-- to get the org.eclipse.osgi.compatibility.state plugin iff
the targeted Eclipse version (e.g., Luna) has it
(backwards compatible with kepler and previous versions) -->
<requirement>
<type>eclipse-feature</type>
<id>org.eclipse.rcp</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
</plugin>
and add the explict dependency to the manifest
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: jbase.tests
Bundle-Vendor: Lorenzo Bettini
Bundle-Version: 0.1.0.qualifier
Bundle-SymbolicName: jbase.tests; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: jbase,
jbase.ui,
org.eclipse.core.runtime,
org.eclipse.xtext.junit4,
org.eclipse.xtext.xbase.lib,
org.eclipse.ui.workbench;resolution:=optional,
org.objectweb.asm;bundle-version="[5.0.1,6.0.0)";resolution:=optional,
org.eclipse.xtext.xbase.junit,
org.eclipse.jdt.core,
org.eclipse.jdt.launching.macosx;resolution:=optional,
jbase.testlanguage.tests,
org.eclipse.xtext.common.types.ui,
org.eclipse.ui.ide,
org.eclipse.pde.core;bundle-version="3.10.101"
Import-Package: org.apache.log4j,
org.junit;version="4.5.0",
org.junit.runner;version="4.5.0",
org.junit.runner.manipulation;version="4.5.0",
org.junit.runner.notification;version="4.5.0",
org.junit.runners;version="4.5.0",
org.junit.runners.model;version="4.5.0",
org.hamcrest.core
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Export-Package: jbase,
jbase
still the question why this does not happen automagically (tycho bug?)
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
| |
Re: UI Tests fail on Mac [message #1718645 is a reply to message #1718632] |
Mon, 28 December 2015 17:43 |
|
Hi Christian
please see my comments inline
On 28/12/2015 14:26, Christian Dietrich wrote:
> the following worked for me
>
> - adapt the target-plaform-configuration places
>
>
> <plugin>
> <groupId>org.eclipse.tycho</groupId>
> <artifactId>target-platform-configuration</artifactId>
> <configuration>
> <environments>
> </environments>
> <dependency-resolution>
> <extraRequirements>
> <!-- to get the
> org.eclipse.osgi.compatibility.state plugin iff
> the targeted Eclipse version (e.g., Luna)
> has it
> (backwards compatible with kepler and
> previous versions) -->
> <requirement>
> <type>eclipse-feature</type>
> <id>org.eclipse.rcp</id>
> <versionRange>0.0.0</versionRange>
> </requirement>
>
> </extraRequirements>
> </dependency-resolution>
> </configuration>
> </plugin>
>
This is already specified in the pom.xml of the tests plugin...
do you mean this has to be specified somewhere else?
>
> and add the explict dependency to the manifest
>
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: jbase.tests
> Bundle-Vendor: Lorenzo Bettini
> Bundle-Version: 0.1.0.qualifier
> Bundle-SymbolicName: jbase.tests; singleton:=true
> Bundle-ActivationPolicy: lazy
> Require-Bundle: jbase,
> jbase.ui,
> org.eclipse.core.runtime,
> org.eclipse.xtext.junit4,
> org.eclipse.xtext.xbase.lib,
> org.eclipse.ui.workbench;resolution:=optional,
> org.objectweb.asm;bundle-version="[5.0.1,6.0.0)";resolution:=optional,
> org.eclipse.xtext.xbase.junit,
> org.eclipse.jdt.core,
> org.eclipse.jdt.launching.macosx;resolution:=optional,
> jbase.testlanguage.tests,
> org.eclipse.xtext.common.types.ui,
> org.eclipse.ui.ide,
> org.eclipse.pde.core;bundle-version="3.10.101"
> Import-Package: org.apache.log4j,
> org.junit;version="4.5.0",
> org.junit.runner;version="4.5.0",
> org.junit.runner.manipulation;version="4.5.0",
> org.junit.runner.notification;version="4.5.0",
> org.junit.runners;version="4.5.0",
> org.junit.runners.model;version="4.5.0",
> org.hamcrest.core
> Bundle-RequiredExecutionEnvironment: JavaSE-1.7
> Export-Package: jbase,
> jbase
Does it work also with this dependency?
org.eclipse.jdt.launching
i.e., the one that does not depend on the operating system?
I saw your pull request https://github.com/LorenzoBettini/jbase/pull/9
(the job for pull request fails, but that's due to my experiment for
using MacOSX build in Travis; this fails for other reasons)
But in your pull request I don't see the changes you mention: the only
commit of the pull request,
https://github.com/cdietrich/jbase/commit/edc4206fb747f7134861a2a39ccfac3b1cd1d912
, is the one which removes the <environment> specifications which I had
recently pushed... is that removal crucial for making it work?
thanks again
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
| | |
Re: UI Tests fail on Mac [message #1718659 is a reply to message #1718650] |
Mon, 28 December 2015 19:12 |
|
i found another solution
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<dependency-resolution>
<extraRequirements>
<!-- to get the org.eclipse.osgi.compatibility.state plugin iff
the targeted Eclipse version (e.g., Luna) has it
(backwards compatible with kepler and previous versions) -->
<requirement>
<type>eclipse-feature</type>
<id>org.eclipse.rcp</id>
<versionRange>0.0.0</versionRange>
</requirement>
<requirement>
<type>eclipse-feature</type>
<id>org.eclipse.jdt</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
</plugin>
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
| |
Goto Forum:
Current Time: Sun Sep 22 18:47:31 GMT 2024
Powered by FUDForum. Page generated in 0.03901 seconds
|