Bug 402067 - [test][shared] don't rely on the presence of an eclipse install
Summary: [test][shared] don't rely on the presence of an eclipse install
Status: RESOLVED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on: 386988
Blocks:
  Show dependency tree
 
Reported: 2013-02-28 16:59 EST by Pascal Rapicault CLA
Modified: 2020-02-19 03:03 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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...