Hi Henrik,
what I found out was that the ant rule
<fileset dir="${target.platform}/plugins/">
did not
work on my Win7 machine but worked on my XP machine. On both machines I had the
environment variable ETRICE_TARGET_PLATFORM set in a way to point to the
local eclipse installation directory.
On Win7
ant always put the current directory in front of the target.platform string,
assuming a relative address resulting in something like
"C:\git\org.eclipse.etrice\tests\org.eclipse.etrice.generator.cpp.tests\"C:\Program
Files (x86)\eclipse"\plugins". I tried using
<fileset dir="/${target.platform}/plugins/">
to force ant to absolute paths but it would still prepend a c: before the target.platform resulting in a bad path c:"C:\Program Files
(x86)\eclipse"\plugins.
Following a hint from the web I tried
setting target.platform = "c:/program files (x86)/eclipse" in the make.xml with
/ instead of \ and this worked for me. When I tried using the environment
variable with / instead of \ this did not
work.
So for me there was no real solution I
could deliver, only a local workaround - is there any ANT guru out there to fix
this issue??
Second: On the win7 machine the generator-tests for cpp
were running flawlessly. I could not reproduce the problem with the standard
headers !
So I'm somehow at a loss with this
issue.
@Henrik: did you observe this issue on your local
machine or on the jenkins machine ? What was the exact installation of MinGW on
this machine?
Best regards,
Peter
Hi Peter,
the
classpath for the generator is the weak point here (and definitely deserves
improvement).
I dropped e.g.
<include
name="org.eclipse.emf.ecore_2.8*.jar" />
and
/org.eclipse.etrice.generator.java.tests/make.xml failed.
In the output
folder you will find in this
case
/org.eclipse.etrice.generator.java.tests/output/generate_err.txt
with
the contents
java.lang.NoClassDefFoundError: org/eclipse/emf/ecore/EObject
Caused by: java.lang.ClassNotFoundException: org.eclipse.emf.ecore.EObject
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
Could not find the main class: org.eclipse.etrice.generator.java.Main. Program will exit.
Exception in thread "main"
To fix the problem you
should compare the includes in make.xml, lines 94ff with the contents of
${ETRICE_TARGET_PLATFORM}.
The problematic point is that (part of) the
expected version number is specified in the includes.
So in some cases a
change of even the minor version would lead to an empty result.
Be
careful with the fix that you don't break users with an older set of
plug-ins.
I am no Ant expert. But I assume it should be possible to
re-use parts of the make.xml for all three generator tests.
That could be
extracted and moved to org.eclipse.etrice.generator.common.tests.
Then we
could avoid having to apply a fix in three places.
Hope that
helps,
Henrik
Am 13.02.2013 11:53, schrieb Karlitschek,
Peter:
Hi all,
in Order to debug the issue, I have made a fresh install of eclipse and cloned the etrice git repository on a Windows7 machine. Unfortunately I cannot run the generator tests for cpp ( nor or C or JAVA ). The ant script stops where the generator.xxx\Main.java class should be loaded with a failure.
My setup:
Eclipse Juno 32-bit, Modeling Edition
Xtext,Xtend 2.3.1
Graphiti 0.9.1
CDT 8.1.1
JDK_1_6-39
ETRICE_C_RUNTIME;ETRICE_CPP_RUNTIME;ETRICE_TARGET_PLATFORM variables set
Did I miss anything in the installation instructions?
Any idea?
- Peter
-----Original Message-----
From: etrice-dev-bounces@xxxxxxxxxxx
[mailto:etrice-dev-bounces@xxxxxxxxxxx] On Behalf Of Henrik
Rentz-Reichert
Sent: Montag, 4. Februar 2013 18:44
To: eTrice developer mailing list
Subject: [etrice-dev] problem with standard headers
Hi all,
we're encountering a problem with the unit test (rather end
to end tests, [1]) for the C++ generator.
The code compiles and runs fine under MinGW on 32 bit systems.
But with MinGW64 there seem to be incompatible types (at
least the timespec) which are defined in both, pthread.h and timer.h.
Does anyone have an idea how to solve this issue?
-Henrik
[1]
http://git.eclipse.org/c/etrice/org.eclipse.etrice.git/tree/te
sts/org.eclipse.etrice.generator.cpp.tests
_______________________________________________
etrice-dev mailing list
etrice-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/etrice-dev
---
This communication contains confidential information. If you are not the intended recipient please return this email to the sender and delete it from your records.
Diese Nachricht enthaelt vertrauliche Informationen. Sollten Sie nicht der beabsichtigte Empfaenger dieser E-mail sein, senden Sie bitte diese an den Absender zurueck und loeschen Sie die E-mail aus Ihrem System.
_______________________________________________
etrice-dev mailing list
etrice-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/etrice-dev