50908
|
1 |
This directory contains jtreg tests which are wrapper tests to execute Graal unit tests similar way they are run in Graal project.
|
|
2 |
The tests use compiler.graalunit.common.GraalUnitTestLauncher helper class to run Graal unit tests where the set of tests to execute
|
|
3 |
is specified by '-prefix' argument. GraalUnitTestLauncher launches ported com.oracle.mxtool.junit.MxJUnitWrapper to run Graal unit
|
|
4 |
tests as it is done by "mx unittest" command from Graal project.
|
|
5 |
|
|
6 |
All compiler/graalunit/*.java tests were automatically generated by generateTests.sh script which reads
|
|
7 |
"testName -> testPrefix [requiresStatement]" mapping from TestPackages.txt file and generates corresponding <testName>Test.java
|
|
8 |
tests. The mapping takes into account tests execution time to avoid very long test runs.
|
|
9 |
|
|
10 |
Graal unit tests depends on following external jar files:
|
|
11 |
asm-5.0.4.jar:
|
|
12 |
https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/asm-5.0.4.jar
|
|
13 |
|
|
14 |
asm-tree-5.0.4.jar:
|
|
15 |
https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/asm-tree-5.0.4.jar
|
|
16 |
|
|
17 |
junit-4.12.jar:
|
|
18 |
https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/junit-4.12.jar
|
|
19 |
|
|
20 |
hamcrest-core-1.3.jar:
|
|
21 |
https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/hamcrest-core-1.3.jar
|
|
22 |
|
|
23 |
java-allocation-instrumenter.jar:
|
|
24 |
https://lafo.ssw.uni-linz.ac.at/pub/java-allocation-instrumenter/java-allocation-instrumenter-8f0db117e64e.jar
|
|
25 |
|
|
26 |
Before running the tests you need to download these jars from above locations in build/<platform>/images/test/hotspot/jtreg/graal/
|
|
27 |
directory. Then you can pass it to jtreg as java option by using "-vmoptions:-Dgraalunit.libs=" or as environment variable
|
|
28 |
by using "-e:TEST_IMAGE_GRAAL_DIR=..."
|
|
29 |
|
|
30 |
Example:
|
|
31 |
> jtreg -vt -jdk:<TESTED_JDK> -vmoptions:"-vmoptions:-Dgraalunit.libs=build/<platform>/images/test/hotspot/jtreg/graal"
|
|
32 |
compiler/graalunit/UtilTest.java
|
|
33 |
|
|
34 |
To run Graal unit tests in Graal as JIT mode pass additional -vmoptions to jtreg:
|
|
35 |
-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+TieredCompilation -XX:+UseJVMCICompiler -Djvmci.Compiler=graal
|
|
36 |
|