提交 fa07efc3 编写于 作者: O ohair

6933294: Fix some test/Makefile issues around Linux ARCH settings, better defaults

Reviewed-by: jjg
上级 f110f34c
......@@ -70,6 +70,10 @@ endif
ifeq ($(UNAME_S), Linux)
OS_NAME = linux
OS_ARCH := $(shell $(UNAME) -m)
# Check for unknown arch, try uname -p if uname -m says unknown
ifeq ($(OS_ARCH),unknown)
OS_ARCH := $(shell $(UNAME) -p)
endif
OS_VERSION := $(shell $(UNAME) -r)
endif
ifndef OS_NAME
......@@ -93,16 +97,26 @@ endif
# Only want major and minor numbers from os version
OS_VERSION := $(shell $(ECHO) "$(OS_VERSION)" | $(CUT) -d'.' -f1,2)
# Try and use names i586, x64, and ia64 consistently
OS_ARCH:=$(subst X64,x64,$(OS_ARCH))
OS_ARCH:=$(subst AMD64,x64,$(OS_ARCH))
OS_ARCH:=$(subst amd64,x64,$(OS_ARCH))
OS_ARCH:=$(subst x86_64,x64,$(OS_ARCH))
OS_ARCH:=$(subst EM64T,x64,$(OS_ARCH))
OS_ARCH:=$(subst em64t,x64,$(OS_ARCH))
OS_ARCH:=$(subst intel64,x64,$(OS_ARCH))
OS_ARCH:=$(subst Intel64,x64,$(OS_ARCH))
OS_ARCH:=$(subst INTEL64,x64,$(OS_ARCH))
# Name to use for x86_64 arch (historically amd64, but should change someday)
OS_ARCH_X64_NAME:=amd64
#OS_ARCH_X64_NAME:=x64
# Alternate arch names (in case this arch is known by a second name)
# PROBLEM_LISTS may use either name.
OS_ARCH2-amd64:=x64
#OS_ARCH2-x64:=amd64
# Try and use the arch names consistently
OS_ARCH:=$(subst x64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(subst X64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(subst AMD64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(subst amd64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(subst x86_64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(subst EM64T,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(subst em64t,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(subst intel64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(subst Intel64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(subst INTEL64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
OS_ARCH:=$(subst IA64,ia64,$(OS_ARCH))
OS_ARCH:=$(subst X86,i586,$(OS_ARCH))
OS_ARCH:=$(subst x86,i586,$(OS_ARCH))
......@@ -110,17 +124,32 @@ OS_ARCH:=$(subst i386,i586,$(OS_ARCH))
OS_ARCH:=$(subst i486,i586,$(OS_ARCH))
OS_ARCH:=$(subst i686,i586,$(OS_ARCH))
# Check for ARCH_DATA_MODEL, adjust OS_ARCH accordingly
# Default ARCH_DATA_MODEL settings
ARCH_DATA_MODEL-i586 = 32
ARCH_DATA_MODEL-$(OS_ARCH_X64_NAME) = 64
ARCH_DATA_MODEL-ia64 = 64
ARCH_DATA_MODEL-sparc = 32
ARCH_DATA_MODEL-sparcv9 = 64
# If ARCH_DATA_MODEL is not defined, try and pick a reasonable default
ifndef ARCH_DATA_MODEL
ARCH_DATA_MODEL:=$(ARCH_DATA_MODEL-$(OS_ARCH))
endif
ifndef ARCH_DATA_MODEL
ARCH_DATA_MODEL=32
endif
# Platform directory name
PLATFORM_OS = $(OS_NAME)-$(OS_ARCH)
# Check ARCH_DATA_MODEL, adjust OS_ARCH accordingly on solaris
ARCH_DATA_MODEL_ERROR= \
ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) cannot be used with $(OS_NAME)-$(ARCH)
ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) cannot be used with $(PLATFORM_OS)
ifeq ($(ARCH_DATA_MODEL),64)
ifeq ($(OS_NAME)-$(OS_ARCH),solaris-i586)
OS_ARCH=x64
ifeq ($(PLATFORM_OS),solaris-i586)
OS_ARCH=$(OS_ARCH_X64_NAME)
endif
ifeq ($(OS_NAME)-$(OS_ARCH),solaris-sparc)
ifeq ($(PLATFORM_OS),solaris-sparc)
OS_ARCH=sparcv9
endif
ifeq ($(OS_ARCH),i586)
......@@ -131,7 +160,7 @@ ifeq ($(ARCH_DATA_MODEL),64)
endif
else
ifeq ($(ARCH_DATA_MODEL),32)
ifeq ($(OS_ARCH),x64)
ifeq ($(OS_ARCH),$(OS_ARCH_X64_NAME))
x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
endif
ifeq ($(OS_ARCH),ia64)
......@@ -145,6 +174,12 @@ else
endif
endif
# Alternate OS_ARCH name (defaults to OS_ARCH)
OS_ARCH2:=$(OS_ARCH2-$(OS_ARCH))
ifeq ($(OS_ARCH2),)
OS_ARCH2:=$(OS_ARCH)
endif
# Root of this test area (important to use full paths in some places)
TEST_ROOT := $(shell $(PWD))
......@@ -152,21 +187,21 @@ TEST_ROOT := $(shell $(PWD))
ifdef ALT_OUTPUTDIR
ABS_OUTPUTDIR = $(ALT_OUTPUTDIR)
else
ABS_OUTPUTDIR = $(TEST_ROOT)/../build/$(OS_NAME)-$(OS_ARCH)
ABS_OUTPUTDIR = $(TEST_ROOT)/../build/$(PLATFORM_OS)
endif
ABS_BUILD_ROOT = $(ABS_OUTPUTDIR)
ABS_TEST_OUTPUT_DIR := $(ABS_BUILD_ROOT)/testoutput/$(UNIQUE_DIR)
ABS_PLATFORM_BUILD_ROOT = $(ABS_OUTPUTDIR)
ABS_TEST_OUTPUT_DIR := $(ABS_PLATFORM_BUILD_ROOT)/testoutput/$(UNIQUE_DIR)
# Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test)
ifndef PRODUCT_HOME
# Try to use j2sdk-image if it exists
ABS_JDK_IMAGE = $(ABS_BUILD_ROOT)/j2sdk-image
PRODUCT_HOME := \
$(shell \
if [ -d $(ABS_JDK_IMAGE) ] ; then \
$(ECHO) "$(ABS_JDK_IMAGE)"; \
else \
$(ECHO) "$(ABS_BUILD_ROOT)"; \
ABS_JDK_IMAGE = $(ABS_PLATFORM_BUILD_ROOT)/j2sdk-image
PRODUCT_HOME := \
$(shell \
if [ -d $(ABS_JDK_IMAGE) ] ; then \
$(ECHO) "$(ABS_JDK_IMAGE)"; \
else \
$(ECHO) "$(ABS_PLATFORM_BUILD_ROOT)"; \
fi)
PRODUCT_HOME := $(PRODUCT_HOME)
endif
......@@ -325,8 +360,10 @@ $(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS)
@$(RM) $@ $@.temp1 $@.temp2
@(($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-all' ) ;\
($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_ARCH)' ) ;\
($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_ARCH2)' ) ;\
($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_VERSION)') ;\
($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH)' ) ;\
($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH2)' ) ;\
($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-all' ) ;\
($(ECHO) "#") ;\
) | $(SED) -e 's@^[\ ]*@@' \
......
......@@ -744,6 +744,9 @@ java/net/ProxySelector/B6737819.java generic-all
# Suspect many of these tests auffer from using fixed ports, no concrete
# evidence.
# Failing on Solaris x86 and Linux x86, filed 6934585
java/nio/channels/AsynchronousSocketChannel/Basic.java generic-all
# Occasionally Failing with java.lang.AssertionError on Windows X64
# at sun.nio.ch.PendingIoCache.clearPendingIoMap(PendingIoCache.java:144)
#java/nio/channels/FileChannel/ReleaseOnCloseDeadlock.java windows-all
......@@ -947,6 +950,15 @@ java/rmi/server/UnicastRemoteObject/unexportObject/UnexportLeak.java generic-all
# jdk_security
# Failing on Solaris i586, 3/9/2010, not a -samevm issue (jdk_security3)
sun/security/pkcs11/Secmod/AddPrivateKey.java solaris-i586
sun/security/pkcs11/ec/ReadCertificates.java solaris-i586
sun/security/pkcs11/ec/ReadPKCS12.java solaris-i586
sun/security/pkcs11/ec/TestCurves.java solaris-i586
sun/security/pkcs11/ec/TestECDSA.java solaris-i586
sun/security/pkcs11/ec/TestECGenSpec.java solaris-i586
sun/security/pkcs11/ec/TestKeyFactory.java solaris-i586
# Unknown problem, could be a jtreg -samevm issue?
# Error while cleaning up threads after test
java/security/Security/SynchronizedAccess.java generic-all
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册