If you do something like:
>$ make CONF_NAME=linux-x86-debug TESTDIRS=../../hotspot/test/<sometest>.java jtreg_tests PRODUCT_HOME=<jdkbuild>
and <sometest>.java has a @requires that prevents it from running on the current platform, make will exit with a non-zero exit code. Here's the tail of the output:
...
Directory "/local/ws/jdk9/hs3/hotspot/testoutput/JTwork" not found: creating
Directory "/local/ws/jdk9/hs3/hotspot/testoutput/JTreport" not found: creating
Test results: no tests selected
Report written to /local/ws/jdk9/hs3/hotspot/testoutput/JTreport/html/report.html
Results written to /local/ws/jdk9/hs3/hotspot/testoutput/JTwork
Summary:
TEST STATS: name= run=0 pass=0 fail=0
EXIT CODE: 1
EXIT CODE: 1
make: *** [jtreg_tests] Error 1
This causes problems when you are trying to run a single jtreg tests on all platforms with jprt. All test runs on platforms that don't run the test due to @requires will end up failing because of the non zero exit code.
The exit code is coming from jtreg, but it's up to test/Makefile to handle it properly. An exit code of 1 specifically means that no tests were run, so test/Makefile can special case this exit code and zero it out so it does not cause make to exit with a non-zero exit code.
>$ make CONF_NAME=linux-x86-debug TESTDIRS=../../hotspot/test/<sometest>.java jtreg_tests PRODUCT_HOME=<jdkbuild>
and <sometest>.java has a @requires that prevents it from running on the current platform, make will exit with a non-zero exit code. Here's the tail of the output:
...
Directory "/local/ws/jdk9/hs3/hotspot/testoutput/JTwork" not found: creating
Directory "/local/ws/jdk9/hs3/hotspot/testoutput/JTreport" not found: creating
Test results: no tests selected
Report written to /local/ws/jdk9/hs3/hotspot/testoutput/JTreport/html/report.html
Results written to /local/ws/jdk9/hs3/hotspot/testoutput/JTwork
Summary:
TEST STATS: name= run=0 pass=0 fail=0
EXIT CODE: 1
EXIT CODE: 1
make: *** [jtreg_tests] Error 1
This causes problems when you are trying to run a single jtreg tests on all platforms with jprt. All test runs on platforms that don't run the test due to @requires will end up failing because of the non zero exit code.
The exit code is coming from jtreg, but it's up to test/Makefile to handle it properly. An exit code of 1 specifically means that no tests were run, so test/Makefile can special case this exit code and zero it out so it does not cause make to exit with a non-zero exit code.