Home » Modeling » TMF (Xtext) » UI Tests fail on Mac
UI Tests fail on Mac [message #1718609] |
Mon, 28 December 2015 04:48  |
Eclipse User |
|
|
|
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
|
|
| | | |
Re: UI Tests fail on Mac [message #1718632 is a reply to message #1718626] |
Mon, 28 December 2015 08:26   |
Eclipse User |
|
|
|
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?)
|
|
| |
Re: UI Tests fail on Mac [message #1718645 is a reply to message #1718632] |
Mon, 28 December 2015 12:43   |
Eclipse User |
|
|
|
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
|
|
| | | |
Re: UI Tests fail on Mac [message #1718741 is a reply to message #1718659] |
Tue, 29 December 2015 11:26  |
Eclipse User |
|
|
|
On 12/28/2015 8:12 PM, Christian Dietrich wrote:
> 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>
>
Thank you Christian!
This really solves the problem :)
Apparently, org.eclipse.jdt feature drags in also jdt.launching.macosx
(even in Linux).
cheers
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
|
|
|
Goto Forum:
Current Time: Sun Jul 27 05:15:06 EDT 2025
Powered by FUDForum. Page generated in 0.37721 seconds
|