6905705: Fix broken exit code values in jdk/test/Makefile

Reviewed-by: tbell
This commit is contained in:
Kelly O'Hair 2009-12-01 08:51:16 -08:00
parent cd8f275bdb
commit 0ce235a4da
7 changed files with 48 additions and 16 deletions

View File

@ -282,11 +282,23 @@ STATS_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/$(STATS_TXT_NAME)
RUNLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/runlist.txt
PASSLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/passlist.txt
FAILLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/faillist.txt
EXITCODE = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/exitcode.txt
TESTEXIT = \
if [ ! -s $(EXITCODE) ] ; then \
$(ECHO) "ERROR: EXITCODE file not filled in."; \
$(ECHO) "1" > $(EXITCODE); \
fi ; \
testExitCode=`$(CAT) $(EXITCODE)`; \
$(ECHO) "EXIT CODE: $${testExitCode}"; \
exit ${testExitCode}
BUNDLE_UP_AND_EXIT = \
( \
exitCode=$$? && \
jtregExitCode=$$? && \
_summary="$(SUMMARY_TXT)"; \
$(RM) -f $(STATS_TXT) $(RUNLIST) $(PASSLIST) $(FAILLIST); \
$(RM) -f $(STATS_TXT) $(RUNLIST) $(PASSLIST) $(FAILLIST) $(EXITCODE); \
$(ECHO) "$${jtregExitCode}" > $(EXITCODE); \
if [ -r "$${_summary}" ] ; then \
$(ECHO) "Summary: $${_summary}" > $(STATS_TXT); \
$(EXPAND) $${_summary} | $(EGREP) -v ' Not run\.' > $(RUNLIST); \
@ -297,10 +309,13 @@ BUNDLE_UP_AND_EXIT = \
$(EGREP) ' Error\.' $(RUNLIST); \
$(EGREP) -v ' Passed\.' $(RUNLIST) ) \
| $(SORT) | $(UNIQ) > $(FAILLIST); \
if [ $${exitCode} != 0 -o -s $(FAILLIST) ] ; then \
if [ $${jtregExitCode} != 0 -o -s $(FAILLIST) ] ; then \
$(EXPAND) $(FAILLIST) \
| $(CUT) -d' ' -f1 \
| $(SED) -e 's@^@FAILED: @' >> $(STATS_TXT); \
if [ $${jtregExitCode} = 0 ] ; then \
jtregExitCode=1; \
fi; \
fi; \
runc="`$(CAT) $(RUNLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
passc="`$(CAT) $(PASSLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
@ -312,8 +327,8 @@ BUNDLE_UP_AND_EXIT = \
$(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \
fi; \
$(CAT) $(STATS_TXT); \
$(ZIP_UP_RESULTS) && $(KILL_DISPLAY) && \
exit $${exitCode} \
$(ZIP_UP_RESULTS) && $(KILL_DISPLAY) ; \
$(TESTEXIT) \
)
################################################################
@ -598,7 +613,7 @@ jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) $(EXCLUDELIST)
$(JTREG_TEST_OPTIONS) \
$(TESTDIRS) \
) ; $(BUNDLE_UP_AND_EXIT) \
) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt
) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT)
PHONY_LIST += jtreg_tests

View File

@ -893,6 +893,10 @@ java/rmi/server/UnicastRemoteObject/unexportObject/UnexportLeak.java generic-all
# jdk_security
# Fails on OpenSolaris, IOException: Attempt to obtain kerberos service ticket
# for host/`hostname`@RABBIT.HOLE failed!
sun/security/krb5/auto/SSL.java generic-all
# Run too slow on Solaris 10 sparc
sun/security/ssl/com/sun/net/ssl/internal/ssl/InputRecord/SSLSocketTimeoutNulls.java solaris-sparc
sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/ClientTimeout.java solaris-sparc
@ -1099,6 +1103,14 @@ sun/tools/jps/jps-lm.sh generic-all
sun/tools/jps/jps-Vvml_2.sh generic-all
sun/tools/jps/jps-m_2.sh generic-all
# Fails on OpenSolaris "Could not synchronize with target"
sun/tools/jps/jps-Defaults.sh generic-all
sun/tools/jps/jps-V_2.sh generic-all
sun/tools/jps/jps-Vm_2.sh generic-all
sun/tools/jps/jps-Vvm.sh generic-all
sun/tools/jps/jps-Vvml.sh generic-all
sun/tools/jps/jps-m.sh generic-all
# Server name error, port 2098 problem?
sun/tools/jstatd/jstatdServerName.sh generic-all

View File

@ -110,9 +110,10 @@ public class BadHandshakeTest {
String exe = System.getProperty("java.home")
+ File.separator + "bin" + File.separator;
String arch = System.getProperty("os.arch");
if (arch.equals("sparcv9")) {
String osname = System.getProperty("os.name");
if (osname.equals("SunOS") && arch.equals("sparcv9")) {
exe += "sparcv9/java";
} else if (arch.equals("amd64")) {
} else if (osname.equals("SunOS") && arch.equals("amd64")) {
exe += "amd64/java";
} else {
exe += "java";

View File

@ -92,9 +92,10 @@ public class DoubleAgentTest {
String exe = System.getProperty("java.home")
+ File.separator + "bin" + File.separator;
String arch = System.getProperty("os.arch");
if (arch.equals("sparcv9")) {
String osname = System.getProperty("os.name");
if (osname.equals("SunOS") && arch.equals("sparcv9")) {
exe += "sparcv9/java";
} else if (arch.equals("amd64")) {
} else if (osname.equals("SunOS") && arch.equals("amd64")) {
exe += "amd64/java";
} else {
exe += "java";

View File

@ -99,9 +99,10 @@ public class ExclusiveBind {
String exe = System.getProperty("java.home") + File.separator + "bin" +
File.separator;
String arch = System.getProperty("os.arch");
if (arch.equals("sparcv9")) {
String osname = System.getProperty("os.name");
if (osname.equals("SunOS") && arch.equals("sparcv9")) {
exe += "sparcv9/java";
} else if (arch.equals("amd64")) {
} else if (osname.equals("SunOS") && arch.equals("amd64")) {
exe += "amd64/java";
} else {
exe += "java";

View File

@ -115,9 +115,10 @@ public class RunToExit {
String exe = System.getProperty("java.home")
+ File.separator + "bin" + File.separator;
String arch = System.getProperty("os.arch");
if (arch.equals("sparcv9")) {
String osname = System.getProperty("os.name");
if (osname.equals("SunOS") && arch.equals("sparcv9")) {
exe += "sparcv9/java";
} else if (arch.equals("amd64")) {
} else if (osname.equals("SunOS") && arch.equals("amd64")) {
exe += "amd64/java";
} else {
exe += "java";

View File

@ -145,9 +145,10 @@ public class SimpleLaunchingConnector implements LaunchingConnector {
String exe = System.getProperty("java.home") + File.separator + "bin" +
File.separator;
String arch = System.getProperty("os.arch");
if (arch.equals("sparcv9")) {
String osname = System.getProperty("os.name");
if (osname.equals("SunOS") && arch.equals("sparcv9")) {
exe += "sparcv9/java";
} else if (arch.equals("amd64")) {
} else if (osname.equals("SunOS") && arch.equals("amd64")) {
exe += "amd64/java";
} else {
exe += "java";