doc/testing.md
branchstuefe-statistical-history
changeset 57335 e90b4960bcd6
parent 54570 93b702d2a0cb
child 57493 b95ebdbf68ca
child 58678 9cf78a70fa4f
equal deleted inserted replaced
57246:75f6a833a444 57335:e90b4960bcd6
    10 The main target `test` uses the jdk-image as the tested product. There is
    10 The main target `test` uses the jdk-image as the tested product. There is
    11 also an alternate target `exploded-test` that uses the exploded image
    11 also an alternate target `exploded-test` that uses the exploded image
    12 instead. Not all tests will run successfully on the exploded image, but using
    12 instead. Not all tests will run successfully on the exploded image, but using
    13 this target can greatly improve rebuild times for certain workflows.
    13 this target can greatly improve rebuild times for certain workflows.
    14 
    14 
    15 Previously, `make test` was used invoke an old system for running test, and
    15 Previously, `make test` was used to invoke an old system for running tests, and
    16 `make run-test` was used for the new test framework. For backward compatibility
    16 `make run-test` was used for the new test framework. For backward compatibility
    17 with scripts and muscle memory, `run-test` (and variants like
    17 with scripts and muscle memory, `run-test` (and variants like
    18 `exploded-run-test` or `run-test-tier1`) are kept as aliases. The old system
    18 `exploded-run-test` or `run-test-tier1`) are kept as aliases.
    19 can still be accessed for some time using `cd test && make`.
       
    20 
    19 
    21 Some example command-lines:
    20 Some example command-lines:
    22 
    21 
    23     $ make test-tier1
    22     $ make test-tier1
    24     $ make test-jdk_lang JTREG="JOBS=8"
    23     $ make test-jdk_lang JTREG="JOBS=8"
   372 Additional VM arguments to provide to forked off VMs. Same as `-jvmArgs <args>`
   371 Additional VM arguments to provide to forked off VMs. Same as `-jvmArgs <args>`
   373 
   372 
   374 #### OPTIONS
   373 #### OPTIONS
   375 Additional arguments to send to JMH.
   374 Additional arguments to send to JMH.
   376 
   375 
       
   376 ## Notes for Specific Tests
       
   377 
       
   378 ### Docker Tests
       
   379 
       
   380 Docker tests with default parameters may fail on systems with glibc versions not
       
   381 compatible with the one used in the default docker image (e.g., Oracle Linux 7.6 for x86).
       
   382 For example, they pass on Ubuntu 16.04 but fail on Ubuntu 18.04 if run like this on x86:
       
   383 
       
   384     $ make test TEST="jtreg:test/hotspot/jtreg/containers/docker"
       
   385 
       
   386 To run these tests correctly, additional parameters for the correct docker image are
       
   387 required on Ubuntu 18.04 by using `JAVA_OPTIONS`.
       
   388 
       
   389     $ make test TEST="jtreg:test/hotspot/jtreg/containers/docker" JTREG="JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu -Djdk.test.docker.image.version=latest"
       
   390 
       
   391 ### Non-US locale
       
   392 
       
   393 If your locale is non-US, some tests are likely to fail. To work around this you can
       
   394 set the locale to US. On Unix platforms simply setting `LANG="en_US"` in the
       
   395 environment before running tests should work. On Windows, setting
       
   396 `JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"` helps for most, but not all test cases.
       
   397 For example:
       
   398 
       
   399     $ export LANG="en_US" && make test TEST=...
       
   400     $ make test JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US" TEST=...
       
   401 
   377 ---
   402 ---
   378 # Override some definitions in the global css file that are not optimal for
   403 # Override some definitions in the global css file that are not optimal for
   379 # this document.
   404 # this document.
   380 header-includes:
   405 header-includes:
   381  - '<style type="text/css">pre, code, tt { color: #1d6ae5; }</style>'
   406  - '<style type="text/css">pre, code, tt { color: #1d6ae5; }</style>'