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

Bug 402067

Summary: [test][shared] don't rely on the presence of an eclipse install
Product: [Eclipse Project] Equinox Reporter: Pascal Rapicault <pascal.rapicault>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: Ed.Merks
Version: 4.0Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 386988    
Bug Blocks:    

Description Pascal Rapicault CLA 2013-02-28 16:59:30 EST
The execution of the shared install tests rely on having a platform or SDK download available and specified as a property (org.eclipse.equinox.p2.reconciler.tests.platform.archive). This makes it a bit painful to test. 

One possibility would be to have the test create its own product archive to test against.
Comment 1 Pascal Rapicault CLA 2013-04-05 20:45:11 EDT
I have looked into this but I have decided to hold on for now.

Here is the approach I have tried:
- create a project that builds a dummy product that includes all p2 UI bundles and its dependencies. 
- use the maven dependency plugin to copy the product into a place that the test can access it and with a wellknown name (configuration below). At this point it is difficult to figure out the classifier of the product for the running platform (in the example below - <classifier>win32.win32.x86_64</classifier>)
- next we need to find a way to execute the tests and collect the results since tycho does not allow to execute tests in the context of a product (added dependency on the relevant tycho bug)

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.7</version>
        <executions>
          <execution>
            <id>copy</id>
            <phase>install</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>net.rapicault.tychotut</groupId>
                  <artifactId>net.rapicault.tychotut.product</artifactId>
                  <version>1.0.0-SNAPSHOT</version>
                  <type>zip</type>
                  <classifier>win32.win32.x86_64</classifier>
                  <outputDirectory>foobar</outputDirectory>
                  <destFileName>product.zip</destFileName>
                </artifactItem>
              </artifactItems>
			  <!-- other configurations here -->
            </configuration>
          </execution>
        </executions>
      </plugin>
Comment 2 Ed Merks CLA 2020-02-19 03:03:11 EST
This issue is stale and I'd have no idea what would really address the need...