Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 295670 - Make Tests run from ANT script only
Summary: Make Tests run from ANT script only
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Dash Athena (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 251933 268420 295773
  Show dependency tree
 
Reported: 2009-11-19 21:42 EST by David Carver CLA
Modified: 2012-01-30 11:32 EST (History)
2 users (show)

See Also:


Attachments
Library.xml used by the test.xml file (6.52 KB, application/xml)
2009-11-19 21:44 EST, David Carver CLA
no flags Details
Test.xml that can be used to launch eclipse for testing. (2.00 KB, application/xml)
2009-11-19 21:45 EST, David Carver CLA
no flags Details
patch to run tests in same VM as build (using same X session) (7.37 KB, patch)
2009-11-24 01:32 EST, Nick Boldt CLA
no flags Details | Diff
mylyn/context/zip (7.63 KB, application/octet-stream)
2009-11-24 01:32 EST, Nick Boldt CLA
no flags Details
new patch (12.78 KB, patch)
2009-11-26 17:24 EST, Nick Boldt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Carver CLA 2009-11-19 21:42:10 EST
Currently the Athena tests are not portable easily to windows system.  They include a shell wrapper to launch an bash shell to start a headless display for UI tests.   While this is fine, it does cause problems with a write once run anywhere design goal.  Attached is a script that I used in some prior non-athena builds to run and launch tests.  We would just need to tweak it so that it uses integrates with Athena, but it should be a starting point.

It leverages a copy of the library.xml, and launches another eclipse headless to run ant.   In order to get this working for those builds running on Hudson on build.eclipse.org, the XVNC plugin should be enabled and configured appropriately so that the build is launched in a headless display.  This creates the necessary output for the tests to use if necessary.

I'll attach the test.xml and the library.xml version that I use.
Comment 1 David Carver CLA 2009-11-19 21:44:33 EST
Created attachment 152664 [details]
Library.xml used by the test.xml file
Comment 2 David Carver CLA 2009-11-19 21:45:39 EST
Created attachment 152665 [details]
Test.xml that can be used to launch eclipse for testing.

This will need tweaking to work with Athena...but might be a basis for runtTests.xml
Comment 3 David Carver CLA 2009-11-19 21:46:55 EST
More info on XVNC for Hudson which is already installed. http://wiki.hudson-ci.org/display/HUDSON/Xvnc+Plugin
Comment 4 Nick Boldt CLA 2009-11-24 01:32:42 EST
Created attachment 152922 [details]
patch to run tests in same VM as build (using same X session)

This should allow builds to run their tests on Win and Mac, as well as Linux. To run in a different $DISPLAY port, wrap build w/ a Hudson job and enable the XVNC plugin so that the whole build+tests run in their own DISPLAY
Comment 5 Nick Boldt CLA 2009-11-24 01:32:46 EST
Created attachment 152923 [details]
mylyn/context/zip
Comment 6 David Carver CLA 2009-11-24 11:28:02 EST
+1 I don't see any major gotchas or anything here.
Comment 7 Nick Boldt CLA 2009-11-25 11:55:29 EST
(In reply to comment #6)
> +1 I don't see any major gotchas or anything here.

Only gotcha that springs to mind is the one that will now require everyone to run their jobs within a VNC session.

If we don't force that new behaviour, we'll have all these jobs fighting for DISPLAY=:0.0, which will cause MANY UI conflicts on build.eclipse.org

If we DO force it, it'll break everyone's build until they enable that checkbox in their job's config.

For now maybe we need a new build.properties option for "local tests" or "run tests with Ant" to switch over to the new way; later we can make that the default behaviour. 

I can make it default for Win / Mac - I'm just concerned about Linux builds.
Comment 8 David Carver CLA 2009-11-25 12:07:40 EST
(In reply to comment #7)
> (In reply to comment #6)
> > +1 I don't see any major gotchas or anything here.
> 
> Only gotcha that springs to mind is the one that will now require everyone to
> run their jobs within a VNC session.
> 
> If we don't force that new behaviour, we'll have all these jobs fighting for
> DISPLAY=:0.0, which will cause MANY UI conflicts on build.eclipse.org
> 
> If we DO force it, it'll break everyone's build until they enable that checkbox
> in their job's config.
> 
> For now maybe we need a new build.properties option for "local tests" or "run
> tests with Ant" to switch over to the new way; later we can make that the
> default behaviour. 
> 
> I can make it default for Win / Mac - I'm just concerned about Linux builds.

Yeah, you'll want to grandfarther this in... with a notice to all athena build users that the old way is being deprecated and will be removed.   I have no problem with a property that is set like: runAntTests, and have that set to true or 1.  Otherwise it just runs the old tests method.

Plus this gives us a way to experiment with it and work out any final kinks in the production system.
Comment 9 Nick Boldt CLA 2009-11-26 17:24:13 EST
Created attachment 153209 [details]
new patch

patch to set default incubation=(nullstring)
also sets new default build.steps=testLocal for running tests in Ant (win/mac/lin) instead of now-deprecated build.steps=test, which launches a separate xvnc/xvfb thread for the tests. Old way still works so as to ease adoption of Hudson users
Comment 10 Nick Boldt CLA 2009-11-26 18:02:13 EST
Last patch checked into CVS and released onto build.eclipse.org.

Documentation:

http://wiki.eclipse.org/Common_Build_Infrastructure/Testing

Reopen if anyone's broken by this.
Comment 11 Nick Boldt CLA 2009-11-26 20:35:56 EST
*** Bug 268420 has been marked as a duplicate of this bug. ***
Comment 12 Nick Boldt CLA 2009-11-26 22:11:16 EST
(In reply to comment #11)
> *** Bug 268420 has been marked as a duplicate of this bug. ***

Managed to build GEF - and run UI tests! - on WinXPHome with VirtualBox 3.0.10

Mac OSX Server 10.5.6 is not playing nicely - perhaps I'm getting the wrong ws value (carbon vs. cocoa) ?
Comment 13 Jacek Pospychala CLA 2009-11-27 03:23:49 EST
great job guys! Old bash script for testing was so scaring.

btw. Nick,
how are people supposed to know about depraciated things, like build.steps=test?
Comment 14 David Carver CLA 2009-11-27 11:32:38 EST
Not sure if this is a build.eclipse.org, problem or not, but using testLocal, with XVNC enabled seems to not have the test ever complete.   Normally it takes about a minute and half to run the actual tests for PsychoPath, but it seems to be stuck as it's been sitting there for about 10 minutes on the test job.

Here is the last lines of the console output:
    [build] init:
    [build] 
    [build] suite:
    [build] 
    [build] init:
    [build]     [mkdir] Created dir: /opt/users/hudsonbuild/.hudson/jobs/cbi-wtp-wst.xsl.psychopath/workspace/build/athena/testing/target/eclipse/results
    [build] 
    [build] ui-test:
    [build] 
    [build] java-test:
    [build]      [echo] Running org.eclipse.wst.xml.xpath2.processor.test.AllPsychoPathTests. Result file: /opt/users/hudsonbuild/.hudson/jobs/cbi-wtp-wst.xsl.psychopath/workspace/build/athena/testing/target/eclipse/results/org.eclipse.wst.xml.xpath2.processor.test.AllPsychoPathTests.xml.

I ended up killing the job after an hour and 10 minutes.   Job normally completes between 20 and 35 minutes depending on how slow CVS is on checkouts.
Comment 15 Nick Boldt CLA 2009-11-27 12:13:03 EST
(In reply to comment #13)
> great job guys! Old bash script for testing was so scaring.
> 
> btw. Nick,
> how are people supposed to know about depraciated things, like
> build.steps=test?


People like yourself add things to the FAQ or elsewhere in the wiki that I've forgotten to document? *shrug* :)

>     [build] java-test:
>     [build]      [echo] Running
> org.eclipse.wst.xml.xpath2.processor.test.AllPsychoPathTests. Result file:
> /opt/users/hudsonbuild/.hudson/jobs/cbi-wtp-wst.xsl.psychopath/workspace/build/athena/testing/target/eclipse/results/org.eclipse.wst.xml.xpath2.processor.test.AllPsychoPathTests.xml.
> 
> I ended up killing the job after an hour and 10 minutes.   Job normally
> completes between 20 and 35 minutes depending on how slow CVS is on checkouts.

Sounds a little like what I was getting on Mac OSX 10.5.7 last night... a TON of errors dumped to console... see bug 268420.
Comment 16 David Carver CLA 2009-11-27 12:32:48 EST
(In reply to comment #15)
> Sounds a little like what I was getting on Mac OSX 10.5.7 last night... a TON
> of errors dumped to console... see bug 268420.

I think we need to set the path to XVNC correctly in the configuration file.  For some reason I'm getting 404 errors when I click the expanded help for the Xvnc plugin on build eclipse.org.  I'll look at bug 268420 as well.  Any idea what the correct path for xvnc is on the build machine?
Comment 17 Andrew Overholt CLA 2009-11-27 13:42:37 EST
> (In reply to comment #16)
>  Any idea what the correct path for xvnc is on the build machine?

/usr/X11R6/bin/Xvnc is what $ which Xvnc gives me.