Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/cmdLineTests/CDSAdaptorTest/readme.txt
6004 views
1
*******************************************************************************
2
* Copyright (c) 2001, 2020 IBM Corp. and others
3
*
4
* This program and the accompanying materials are made available under
5
* the terms of the Eclipse Public License 2.0 which accompanies this
6
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
7
* or the Apache License, Version 2.0 which accompanies this distribution and
8
* is available at https://www.apache.org/licenses/LICENSE-2.0.
9
*
10
* This Source Code may also be made available under the following
11
* Secondary Licenses when the conditions for such availability set
12
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13
* General Public License, version 2 with the GNU Classpath
14
* Exception [1] and GNU General Public License, version 2 with the
15
* OpenJDK Assembly Exception [2].
16
*
17
* [1] https://www.gnu.org/software/classpath/license.html
18
* [2] http://openjdk.java.net/legal/assembly-exception.html
19
*
20
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
21
*******************************************************************************
22
23
This test suite is the place holder for adding CDS Adaptor tests.
24
Command line tests present in cdsadaptortest.xml use combination of java classes and OSGi bundles to achieve their purpose.
25
Main purpose of java class is to start OSGi framework and install required bundles.
26
But they may not be limited to this task only.
27
28
Few guidelines/assumptions when writing/updating tests placed in this project:
29
30
1) Java class are placed in org.openj9.test.cdsadaptortest package.
31
32
2) OSGi bundles required by the java class are created outside this project and
33
only the bundle jar (including the source code) is committed to this project.
34
35
3) As a convention, OSGi bundles required by a java class are to be placed in a directory corresponding to the class name.
36
For example if java class name is CDSTest.java, then its bundles should be put in resources/CDSTestBundles directory.
37
You may also add a readme.txt describing the working of your test in the same directory.
38
39
4) We are using Equinox as the OSGi framework. It is present as org.eclipse.osgi_<version>.jar under "resources" directory.
40
CDS Adaptor bundle is present in "resources/FrameworkBundles" directory.
41
42
Structure of "resources" directory:
43
44
resources
45
|
46
|--FrameworkBundles: this directory contains bundles required by the framework. eg CDS Adaptor bundle.
47
|
48
|--org.eclipse.osgi_<version>.jar: this is Equinox jar file, an OSGi framework implementation, and it contains cds adaptor.
49
|
50
|--TestBundle: this directory contains bundle source code required by java class TestBundle.
51
|
52
|--WeavinghookTest: this directory contains bundle source code required by java class WeavinghookTest.
53
54
5) If a new version of Equinox jar is checked in, their version number in cdsadaptortest.xml needs to be updated as well.
55
Failing to do this will cause tests to fail.
56
Equinox builds are available at: http://download.eclipse.org/equinox/
57
58
6) If existing OSGi bundles are to be modified, the corresponding bundle jar file needs to be checked out and
59
imported in the eclipse workspace as follows:
60
- Go to File->Import->Plug-in Development->Plug-ins and Fragments. This opens up "Import Plug-ins and Fragments" form.
61
- Under "Import From" browse the "Directory" where bundle jar is present.
62
- Under "Plug-ins and Fragments to Import" select "Select from all plug-in and fragments found at the specified location".
63
- Under "Import As", select "Projects with source folders".
64
- Click Next.
65
- Under "Plug-ins and Fragments found", select the bundles you wish to import.
66
- Click Finish.
67
- A new project should appear in your workspace for each bundle imported.
68
69
Now, the OSGi bundle can be modified as required.
70
71
To create jar file for your bundle, follow these steps:
72
- Right click the bundle project and select Export->Plug-in Development->Deployable plug-ins and Fragments.
73
- In the Options tab, check "Export Source" and select "Include source in exported plug-ins" from the drop-down list.
74
- You may set the "Qualifier replacement" as you wish. If not given, today's date will be used.
75
76