8180651: Make target to run tests on exploded image
Reviewed-by: ihse
This commit is contained in:
parent
83e1ea4eeb
commit
79f9ab4235
@ -29,13 +29,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<h2 id="using-the-run-test-framework">Using the run-test framework</h2>
|
<h2 id="using-the-run-test-framework">Using the run-test framework</h2>
|
||||||
<p>This new way of running tests is developer-centric. It assumes that you have built a jdk locally and want to test it. Running common test targets is simple, and more complex ad-hoc combination of tests is possible. The user interface is forgiving, and clearly report errors it cannot resolve.</p>
|
<p>This new way of running tests is developer-centric. It assumes that you have built a jdk locally and want to test it. Running common test targets is simple, and more complex ad-hoc combination of tests is possible. The user interface is forgiving, and clearly report errors it cannot resolve.</p>
|
||||||
|
<p>The main target "run-test" uses the jdk-image as the tested product. There is also an alternate target "exploded-run-test" that uses the exploded image instead. Not all tests will run successfully on the exploded image, but using this target can greatly improve rebuild times for certain workflows.</p>
|
||||||
<p>Some example command-lines:</p>
|
<p>Some example command-lines:</p>
|
||||||
<pre><code>$ make run-test-tier1
|
<pre><code>$ make run-test-tier1
|
||||||
$ make run-test-jdk_lang JTREG="JOBS=8"
|
$ make run-test-jdk_lang JTREG="JOBS=8"
|
||||||
$ make run-test TEST=jdk_lang
|
$ make run-test TEST=jdk_lang
|
||||||
$ make run-test-only TEST="gtest:LogTagSet gtest:LogTagSetDescriptions" GTEST="REPEAT=-1"
|
$ make run-test-only TEST="gtest:LogTagSet gtest:LogTagSetDescriptions" GTEST="REPEAT=-1"
|
||||||
$ make run-test TEST="hotspot/test:hotspot_gc" JTREG="JOBS=1;TIMEOUT=8;VM_OTIONS=-XshowSettings -Xlog:gc+ref=debug"
|
$ make run-test TEST="hotspot/test:hotspot_gc" JTREG="JOBS=1;TIMEOUT=8;VM_OTIONS=-XshowSettings -Xlog:gc+ref=debug"
|
||||||
$ make run-test TEST="jtreg:hotspot/test:hotspot_gc hotspot/test/native_sanity/JniVersion.java"</code></pre>
|
$ make run-test TEST="jtreg:hotspot/test:hotspot_gc hotspot/test/native_sanity/JniVersion.java"
|
||||||
|
$ make exploded-run-test TEST=hotspot_tier1</code></pre>
|
||||||
<h2 id="test-selection">Test selection</h2>
|
<h2 id="test-selection">Test selection</h2>
|
||||||
<p>All functionality is available using the run-test make target. In this use case, the test or tests to be executed is controlled using the <code>TEST</code> variable. To speed up subsequent test runs with no source code changes, run-test-only can be used instead, which do not depend on the source and test image build.</p>
|
<p>All functionality is available using the run-test make target. In this use case, the test or tests to be executed is controlled using the <code>TEST</code> variable. To speed up subsequent test runs with no source code changes, run-test-only can be used instead, which do not depend on the source and test image build.</p>
|
||||||
<p>For some common top-level tests, direct make targets have been generated. This includes all JTreg test groups, the hotspot gtest, and custom tests (if present). This means that <code>make run-test-tier1</code> is equivalent to <code>make run-test TEST="tier1"</code>, but the latter is more tab-completion friendly. For more complex test runs, the <code>run-test TEST="x"</code> solution needs to be used.</p>
|
<p>For some common top-level tests, direct make targets have been generated. This includes all JTreg test groups, the hotspot gtest, and custom tests (if present). This means that <code>make run-test-tier1</code> is equivalent to <code>make run-test TEST="tier1"</code>, but the latter is more tab-completion friendly. For more complex test runs, the <code>run-test TEST="x"</code> solution needs to be used.</p>
|
||||||
|
@ -7,6 +7,11 @@ built a jdk locally and want to test it. Running common test targets is simple,
|
|||||||
and more complex ad-hoc combination of tests is possible. The user interface is
|
and more complex ad-hoc combination of tests is possible. The user interface is
|
||||||
forgiving, and clearly report errors it cannot resolve.
|
forgiving, and clearly report errors it cannot resolve.
|
||||||
|
|
||||||
|
The main target "run-test" uses the jdk-image as the tested product. There is
|
||||||
|
also an alternate target "exploded-run-test" that uses the exploded image
|
||||||
|
instead. Not all tests will run successfully on the exploded image, but using
|
||||||
|
this target can greatly improve rebuild times for certain workflows.
|
||||||
|
|
||||||
Some example command-lines:
|
Some example command-lines:
|
||||||
|
|
||||||
$ make run-test-tier1
|
$ make run-test-tier1
|
||||||
@ -15,6 +20,7 @@ Some example command-lines:
|
|||||||
$ make run-test-only TEST="gtest:LogTagSet gtest:LogTagSetDescriptions" GTEST="REPEAT=-1"
|
$ make run-test-only TEST="gtest:LogTagSet gtest:LogTagSetDescriptions" GTEST="REPEAT=-1"
|
||||||
$ make run-test TEST="hotspot/test:hotspot_gc" JTREG="JOBS=1;TIMEOUT=8;VM_OTIONS=-XshowSettings -Xlog:gc+ref=debug"
|
$ make run-test TEST="hotspot/test:hotspot_gc" JTREG="JOBS=1;TIMEOUT=8;VM_OTIONS=-XshowSettings -Xlog:gc+ref=debug"
|
||||||
$ make run-test TEST="jtreg:hotspot/test:hotspot_gc hotspot/test/native_sanity/JniVersion.java"
|
$ make run-test TEST="jtreg:hotspot/test:hotspot_gc hotspot/test/native_sanity/JniVersion.java"
|
||||||
|
$ make exploded-run-test TEST=hotspot_tier1
|
||||||
|
|
||||||
## Test selection
|
## Test selection
|
||||||
|
|
||||||
|
@ -56,6 +56,8 @@ help:
|
|||||||
$(info $(_) make test # Run tests, default is all tests (see TEST below))
|
$(info $(_) make test # Run tests, default is all tests (see TEST below))
|
||||||
$(info $(_) make run-test-<test> # Run test, e.g. run-test-tier1)
|
$(info $(_) make run-test-<test> # Run test, e.g. run-test-tier1)
|
||||||
$(info $(_) make run-test TEST=<t> # Run test(s) given by TEST specification)
|
$(info $(_) make run-test TEST=<t> # Run test(s) given by TEST specification)
|
||||||
|
$(info $(_) make exploded-run-test TEST=<t> # Run test(s) on the exploded image instead of)
|
||||||
|
$(info $(_) # the full jdk image)
|
||||||
$(info )
|
$(info )
|
||||||
$(info Targets for cleaning)
|
$(info Targets for cleaning)
|
||||||
$(info $(_) make clean # Remove all files generated by make, but not those)
|
$(info $(_) make clean # Remove all files generated by make, but not those)
|
||||||
|
@ -450,13 +450,18 @@ define DeclareRunTestRecipe
|
|||||||
run-test-$1:
|
run-test-$1:
|
||||||
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test TEST="$1")
|
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test TEST="$1")
|
||||||
|
|
||||||
|
exploded-run-test-$1:
|
||||||
|
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test \
|
||||||
|
TEST="$1" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR))
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# ALL_NAMED_TESTS is defined in FindTests.gmk
|
# ALL_NAMED_TESTS is defined in FindTests.gmk
|
||||||
$(foreach t, $(ALL_NAMED_TESTS), $(eval $(call DeclareRunTestRecipe,$t)))
|
$(foreach t, $(ALL_NAMED_TESTS), $(eval $(call DeclareRunTestRecipe,$t)))
|
||||||
ALL_TEST_TARGETS := $(addprefix run-test-, $(ALL_NAMED_TESTS))
|
ALL_TEST_TARGETS := $(addprefix run-test-, $(ALL_NAMED_TESTS))
|
||||||
|
ALL_EXPLODED_TEST_TARGETS := $(addprefix exploded-run-test-, $(ALL_NAMED_TESTS))
|
||||||
|
|
||||||
ALL_TARGETS += $(ALL_TEST_TARGETS)
|
ALL_TARGETS += $(ALL_TEST_TARGETS) $(ALL_EXPLODED_TEST_TARGETS)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Build tests
|
# Build tests
|
||||||
@ -485,6 +490,10 @@ test-image-jdk-jtreg-native:
|
|||||||
run-test:
|
run-test:
|
||||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test TEST="$(TEST)")
|
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test TEST="$(TEST)")
|
||||||
|
|
||||||
|
exploded-run-test:
|
||||||
|
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test \
|
||||||
|
TEST="$(TEST)" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR))
|
||||||
|
|
||||||
ifeq ($(BUILD_GTEST), true)
|
ifeq ($(BUILD_GTEST), true)
|
||||||
test-image-hotspot-gtest:
|
test-image-hotspot-gtest:
|
||||||
+($(CD) $(HOTSPOT_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f GtestImage.gmk)
|
+($(CD) $(HOTSPOT_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f GtestImage.gmk)
|
||||||
@ -514,7 +523,7 @@ ALL_TARGETS += prepare-test-image build-test-hotspot-jtreg-native \
|
|||||||
test-image-hotspot-jtreg-native build-test-jdk-jtreg-native \
|
test-image-hotspot-jtreg-native build-test-jdk-jtreg-native \
|
||||||
test-image-jdk-jtreg-native build-test-lib build-test-failure-handler \
|
test-image-jdk-jtreg-native build-test-lib build-test-failure-handler \
|
||||||
test-failure-handler test-image-failure-handler test-image-hotspot-gtest \
|
test-failure-handler test-image-failure-handler test-image-hotspot-gtest \
|
||||||
run-test
|
run-test exploded-run-test
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Run tests
|
# Run tests
|
||||||
@ -807,9 +816,11 @@ else
|
|||||||
test: jdk-image test-image
|
test: jdk-image test-image
|
||||||
|
|
||||||
run-test: jdk-image test-image
|
run-test: jdk-image test-image
|
||||||
|
exploded-run-test: exploded-image test-image
|
||||||
|
|
||||||
# Declare dependency for all generated test targets
|
# Declare dependency for all generated test targets
|
||||||
$(foreach t, $(ALL_TEST_TARGETS), $(eval $t: jdk-image test-image))
|
$(foreach t, $(ALL_TEST_TARGETS), $(eval $t: jdk-image test-image))
|
||||||
|
$(foreach t, $(ALL_EXPLODED_TEST_TARGETS), $(eval $t: exploded-image test-image))
|
||||||
|
|
||||||
create-buildjdk-copy: jdk.jlink-java java.base-gendata \
|
create-buildjdk-copy: jdk.jlink-java java.base-gendata \
|
||||||
$(addsuffix -java, $(INTERIM_IMAGE_MODULES))
|
$(addsuffix -java, $(INTERIM_IMAGE_MODULES))
|
||||||
|
Loading…
Reference in New Issue
Block a user