Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/CacheManagement/readme.txt
6000 views
1
<!--
2
Copyright (c) 2010, 2019 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 project contains an infrastructure and tests for exercising the shared classes command line options.
24
25
The infrastructure is all in 'tests.sharedclasses' and the most important class there is
26
TestUtils. It provides a lot of infrastructure that subclasses can use. The subclasses
27
are in tests.sharedclasses.options and each of those is a single test, with a main method.
28
They can all be invoked standalone. However, they are also pulled together into a Junit
29
testcase in 'tests.shared.options.junit'. The TestOptionsBase class pulls together all
30
the tests but is abstract - the further subtypes of TestOptionsBase are the real testcases
31
but all they do is provide alternative setUp/tearDown methods that will run executed around
32
each of the testcases in TestOptionsBase. The testsuite AllTests pulls together the
33
variations of running the testcases. For example, TestOptionsDefault runs all the tests
34
letting the cache directory default whilst TestOptionsCacheDir runs all the tests whilst
35
setting the cacheDir explicitly to a destination.
36
37
When writing a testcase main method, the runXXX methods inherited from the superclass TestUtils
38
will invoke a command, the output of the command is collected and can be examined directly or
39
checked via helper checkOutputXXX methods.
40
41
TestUtils currently distinguishes Windows from 'every other platform' - other distinctions may
42
be required if running on further platforms. The distinction is made due to differences in
43
how the control files manifest on windows and unix platforms.
44
45
Some of the shared memory tests are also likely to be linux only.
46
47
The testcode directory contains some simple classes that can be invoked by the commands that are
48
spawned - if the testcode is changed, the testcode.jar file at the top level should be updated by
49
running this command whilst in the testcode subdirectory:
50
jar -cvMf ../src/testcode.jar *
51
The testcode jar is kept in the src tree so it can be treated as a java resource and will be
52
found by a classloader lookup - meaning the user wont have to supply the path to it.
53
54
===
55
The tests can be launched as JUnit tests and the five possible combinations are included as launch profiles here.
56
You must edit the config.properties to choose the JVM that needs testing before you launch them.
57
58
There is a lightweight cmdlinetester script that invokes JUnit and that is what is used on nescafe.
59