Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 208021

Summary: [prov] Run the test framework on provisioned SDK
Product: [Eclipse Project] Equinox Reporter: DJ Houghton <dj.houghton>
Component: p2Assignee: DJ Houghton <dj.houghton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: john.arthorne, kim.moir, overholt, pascal
Version: 3.4   
Target Milestone: 3.4 M6   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 222125, 222341    
Bug Blocks:    
Attachments:
Description Flags
Proposed fix
none
Updated patch
none
this is the .log that results when trying to run the tests in I20080311-0924
none
.log from running tests on I20080312-1200
none
.log from running tests on N20080313-2106 none

Description DJ Houghton CLA 2007-10-30 11:18:13 EDT
We should:
- run the agent
- provision an SDK
- zip it up
- grab the appropriate test framework zip
- run all the SDK tests

Smile and high-fives all around when it passes on the first try. ;-)
Comment 1 John Arthorne CLA 2007-12-11 23:20:23 EST
Not for M3, I guess.
Comment 2 John Arthorne CLA 2008-02-07 16:06:49 EST
I took a quick stab at this, but it immediately bombed:

Can't install org.eclipse.equinox.p2.metadata.generator/0.1.0.v20080205-2202 from location file:plugins\org.eclipse.equinox.p2.metadata.generator_0.1.0.v20080205-2202.jar
org.osgi.framework.BundleException: An error occurred trying to read the bundle
        at org.eclipse.osgi.internal.baseadaptor.BundleInstall.begin(BundleInstall.java:94)
        at org.eclipse.osgi.framework.internal.core.Framework.installWorkerPrivileged(Framework.java:937)
        at org.eclipse.osgi.framework.internal.core.Framework$1.run(Framework.java:823)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.framework.internal.core.Framework.installWorker(Framework.java:904)
        at org.eclipse.osgi.framework.internal.core.Framework.installBundle(Framework.java:818)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.installBundle(BundleContextImpl.java:210)
        at org.eclipse.equinox.simpleconfigurator.internal.ConfigApplier.installBundles(ConfigApplier.java:182)
        at org.eclipse.equinox.simpleconfigurator.internal.ConfigApplier.install(ConfigApplier.java:60)
        at org.eclipse.equinox.simpleconfigurator.internal.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:109)
        at org.eclipse.equinox.simpleconfigurator.internal.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:123)
        at org.eclipse.equinox.simpleconfigurator.internal.Activator.start(Activator.java:49)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
        at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:355)
        at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1073)
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:632)
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:495)
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:280)
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.launch(StartLevelManager.java:248)
        at org.eclipse.osgi.framework.internal.core.SystemBundle.resume(SystemBundle.java:153)
        at org.eclipse.osgi.framework.internal.core.Framework.launch(Framework.java:643)
Comment 3 John Arthorne CLA 2008-03-10 15:50:41 EDT
Created attachment 92076 [details]
Proposed fix

This patch changes the test framework to unzip test plugins into the dropins folder rather than plugins.  This seems work except the plugins added to dropins don't all seem to be installed on the first startup. If you run the tests a second time without cleanup, it succeeds on the second run.

One general problem is that the various test.xml files in the different Eclipse components reference the library.xml file by path:

<property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>

These should be changed to:

<property name="library-file" value="${eclipse-home}/dropins/eclipse/plugins/org.eclipse.test/library.xml"/>


In this patch, we define the "library-file" property directly in the master test.xml in releng, and this works. There may be other cases where people have test.xml scripts that reference library.xml or other scripts by path that are now in different a different location.
Comment 4 Pascal Rapicault CLA 2008-03-10 16:09:44 EDT
DJ says "The linux shell scripts must also be changed to extract the org.eclipse.test plugin to the dropins folder".
Comment 5 DJ Houghton CLA 2008-03-10 16:15:30 EDT
Kim, this is the patch for running the tests on a p2 provisioned SDK. Note Pascal's note in comment #4 that we have to update the runtests for Linux as well.
Comment 6 John Arthorne CLA 2008-03-10 17:36:36 EDT
Created attachment 92092 [details]
Updated patch

Added: 
+ Linux script change
+ Run eclipse -initialize so that reconcile happens and test application is found.
Comment 7 Kim Moir CLA 2008-03-10 17:43:49 EDT
patch released, starting test build with a restricted set of of tests.  Don't have time to run them all tonight.
Comment 8 DJ Houghton CLA 2008-03-11 06:08:04 EDT
Kim, I see the incoming change in org.eclipse.test (in HEAD) but not in the eclipsebuilder project. Are you using the one from HEAD for the build or a tag from a branch?
Comment 9 Kim Moir CLA 2008-03-11 09:54:00 EDT
Yes in p2integration2 branch 
Comment 10 Kim Moir CLA 2008-03-11 17:41:52 EDT
Created attachment 92235 [details]
this is the .log that results when trying to run the tests in I20080311-0924

The tests are all failing...I've attached the .log from the first suite.
Comment 11 Kim Moir CLA 2008-03-12 16:57:34 EDT
Created attachment 92368 [details]
.log from running tests on I20080312-1200
Comment 12 Kim Moir CLA 2008-03-14 03:48:14 EDT
Created attachment 92546 [details]
.log from running tests on  N20080313-2106
Comment 13 John Arthorne CLA 2008-03-16 23:08:51 EDT
See also bug 222871 and bug 222895.
Comment 14 DJ Houghton CLA 2008-03-17 15:59:11 EDT
Fixed.