Skip to content

Commit b399e86

Browse files
authored
Merge pull request #614 from jdmpapin/version-exit-status
Ensure test-image-openj9 target fails when java -version fails
2 parents 9496bc7 + 22b0ac1 commit b399e86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

closed/custom/Main.gmk

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ===========================================================================
2-
# (c) Copyright IBM Corp. 2017, 2021 All Rights Reserved
2+
# (c) Copyright IBM Corp. 2017, 2023 All Rights Reserved
33
# ===========================================================================
44
# This code is free software; you can redistribute it and/or modify it
55
# under the terms of the GNU General Public License version 2 only, as
@@ -76,7 +76,7 @@ ALL_TARGETS += debug-image
7676
test-image-openj9 : exploded-image
7777
@+$(OPENJ9_MAKE) openj9_test_image
7878
ifneq ($(COMPILE_TYPE), cross)
79-
$(JDK_OUTPUTDIR)/bin/java -version 2>&1 | $(TEE) $(TEST_IMAGE_DIR)/openj9/java-version.txt
79+
rc=0; $(JDK_OUTPUTDIR)/bin/java -version >$(TEST_IMAGE_DIR)/openj9/java-version.txt 2>&1 || rc="$$?"; $(CAT) $(TEST_IMAGE_DIR)/openj9/java-version.txt; exit "$$rc"
8080
endif
8181

8282
ALL_TARGETS += test-image-openj9

0 commit comments

Comments
 (0)