Path: blob/master/test/functional/cmdLineTests/CDSAdaptorTest/readme.txt
6004 views
*******************************************************************************1* Copyright (c) 2001, 2020 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* 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-exception20*******************************************************************************2122This test suite is the place holder for adding CDS Adaptor tests.23Command line tests present in cdsadaptortest.xml use combination of java classes and OSGi bundles to achieve their purpose.24Main purpose of java class is to start OSGi framework and install required bundles.25But they may not be limited to this task only.2627Few guidelines/assumptions when writing/updating tests placed in this project:28291) Java class are placed in org.openj9.test.cdsadaptortest package.30312) OSGi bundles required by the java class are created outside this project and32only the bundle jar (including the source code) is committed to this project.33343) As a convention, OSGi bundles required by a java class are to be placed in a directory corresponding to the class name.35For example if java class name is CDSTest.java, then its bundles should be put in resources/CDSTestBundles directory.36You may also add a readme.txt describing the working of your test in the same directory.37384) We are using Equinox as the OSGi framework. It is present as org.eclipse.osgi_<version>.jar under "resources" directory.39CDS Adaptor bundle is present in "resources/FrameworkBundles" directory.4041Structure of "resources" directory:4243resources44|45|--FrameworkBundles: this directory contains bundles required by the framework. eg CDS Adaptor bundle.46|47|--org.eclipse.osgi_<version>.jar: this is Equinox jar file, an OSGi framework implementation, and it contains cds adaptor.48|49|--TestBundle: this directory contains bundle source code required by java class TestBundle.50|51|--WeavinghookTest: this directory contains bundle source code required by java class WeavinghookTest.52535) If a new version of Equinox jar is checked in, their version number in cdsadaptortest.xml needs to be updated as well.54Failing to do this will cause tests to fail.55Equinox builds are available at: http://download.eclipse.org/equinox/56576) If existing OSGi bundles are to be modified, the corresponding bundle jar file needs to be checked out and58imported in the eclipse workspace as follows:59- Go to File->Import->Plug-in Development->Plug-ins and Fragments. This opens up "Import Plug-ins and Fragments" form.60- Under "Import From" browse the "Directory" where bundle jar is present.61- Under "Plug-ins and Fragments to Import" select "Select from all plug-in and fragments found at the specified location".62- Under "Import As", select "Projects with source folders".63- Click Next.64- Under "Plug-ins and Fragments found", select the bundles you wish to import.65- Click Finish.66- A new project should appear in your workspace for each bundle imported.6768Now, the OSGi bundle can be modified as required.6970To create jar file for your bundle, follow these steps:71- Right click the bundle project and select Export->Plug-in Development->Deployable plug-ins and Fragments.72- In the Options tab, check "Export Source" and select "Include source in exported plug-ins" from the drop-down list.73- You may set the "Qualifier replacement" as you wish. If not given, today's date will be used.747576