Merge
This commit is contained in:
commit
cc1b7fd05d
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
|
# Copyright 2006-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -34,8 +34,8 @@ solaris_i586_5.10,\
|
|||||||
solaris_x64_5.10,\
|
solaris_x64_5.10,\
|
||||||
linux_i586_2.6,\
|
linux_i586_2.6,\
|
||||||
linux_x64_2.6,\
|
linux_x64_2.6,\
|
||||||
windows_i586,\
|
windows_i586_5.0,\
|
||||||
windows_x64
|
windows_x64_5.2
|
||||||
|
|
||||||
# The different build flavors we want
|
# The different build flavors we want
|
||||||
jprt.build.flavors=product,fastdebug
|
jprt.build.flavors=product,fastdebug
|
||||||
@ -51,21 +51,37 @@ jprt.run.flavor.c2.option=-server
|
|||||||
jprt.solaris_sparcv9.build.platform.match32=solaris_sparc_5.10
|
jprt.solaris_sparcv9.build.platform.match32=solaris_sparc_5.10
|
||||||
jprt.solaris_x64.build.platform.match32=solaris_i586_5.10
|
jprt.solaris_x64.build.platform.match32=solaris_i586_5.10
|
||||||
|
|
||||||
# Standard list of jprt test targets for this workspace
|
# Standard test target for everybody
|
||||||
jprt.test.targets=*-*-*-jvm98
|
jprt.test.targets=*-*-*-jvm98
|
||||||
jprt.regression.test.targets= \
|
|
||||||
*-product-*-java/lang, \
|
|
||||||
*-product-*-java/security, \
|
|
||||||
*-product-*-java/text, \
|
|
||||||
*-product-*-java/util
|
|
||||||
|
|
||||||
#jprt.regression.test.targets= \
|
# Test targets in test/Makefile (some longer running tests only test c2)
|
||||||
# *-product-*-java/awt, \
|
jprt.make.rule.test.targets= \
|
||||||
# *-product-*-java/beans, \
|
*-product-*-jdk_beans1, \
|
||||||
# *-product-*-java/io, \
|
*-product-*-jdk_beans2, \
|
||||||
# *-product-*-java/net, \
|
*-product-*-jdk_beans3, \
|
||||||
# *-product-*-java/nio, \
|
*-product-*-jdk_io, \
|
||||||
# *-product-*-java/rmi, \
|
*-product-*-jdk_lang, \
|
||||||
|
*-product-*-jdk_management1, \
|
||||||
|
*-product-*-jdk_management2, \
|
||||||
|
*-product-*-jdk_math, \
|
||||||
|
*-product-*-jdk_misc, \
|
||||||
|
*-product-*-jdk_net, \
|
||||||
|
*-product-*-jdk_nio1, \
|
||||||
|
*-product-*-jdk_nio2, \
|
||||||
|
*-product-*-jdk_nio3, \
|
||||||
|
*-product-*-jdk_security1, \
|
||||||
|
*-product-*-jdk_security2, \
|
||||||
|
*-product-*-jdk_security3, \
|
||||||
|
*-product-*-jdk_text, \
|
||||||
|
*-product-*-jdk_tools1, \
|
||||||
|
*-product-*-jdk_tools2, \
|
||||||
|
*-product-*-jdk_util
|
||||||
|
|
||||||
|
# Some of these are crashing Xvfb or windows manager, need dedicated DISPLAY per test batch
|
||||||
|
jprt2.make.rule.test.targets= \
|
||||||
|
*-product-*-jdk_awt, \
|
||||||
|
*-product-*-jdk_rmi, \
|
||||||
|
*-product-*-jdk_swing, \
|
||||||
|
|
||||||
# Directories needed to build
|
# Directories needed to build
|
||||||
jprt.bundle.exclude.src.dirs=build
|
jprt.bundle.exclude.src.dirs=build
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved.
|
# Copyright 1995-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -27,83 +27,141 @@
|
|||||||
# Makefile to run various jdk tests
|
# Makefile to run various jdk tests
|
||||||
#
|
#
|
||||||
|
|
||||||
# Get OS/ARCH specifics
|
# Empty these to get rid of some default rules
|
||||||
OSNAME = $(shell uname -s)
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .java
|
||||||
|
CO=
|
||||||
|
GET=
|
||||||
|
|
||||||
|
# Utilities used
|
||||||
|
AWK = awk
|
||||||
|
CAT = cat
|
||||||
|
CD = cd
|
||||||
|
CHMOD = chmod
|
||||||
|
CP = cp
|
||||||
|
CUT = cut
|
||||||
|
ECHO = echo
|
||||||
|
EGREP = egrep
|
||||||
|
EXPAND = expand
|
||||||
|
EXPR = expr
|
||||||
|
KILL = /usr/bin/kill
|
||||||
|
MKDIR = mkdir
|
||||||
|
NOHUP = nohup
|
||||||
|
PWD = pwd
|
||||||
|
SED = sed
|
||||||
|
SLEEP = sleep
|
||||||
|
SORT = sort
|
||||||
|
TEE = tee
|
||||||
|
UNAME = uname
|
||||||
|
UNIQ = uniq
|
||||||
|
WC = wc
|
||||||
|
XHOST = xhost
|
||||||
|
ZIP = zip
|
||||||
|
|
||||||
|
# Get OS name from uname
|
||||||
|
UNAME_S := $(shell $(UNAME) -s)
|
||||||
|
|
||||||
# Commands to run on paths to make mixed paths for java on windows
|
# Commands to run on paths to make mixed paths for java on windows
|
||||||
GETMIXEDPATH=echo
|
GETMIXEDPATH=$(ECHO)
|
||||||
|
|
||||||
# Location of developer shared files
|
# Location of developer shared files
|
||||||
SLASH_JAVA = /java
|
SLASH_JAVA = /java
|
||||||
|
|
||||||
# Platform specific settings
|
# Platform specific settings
|
||||||
ifeq ($(OSNAME), SunOS)
|
ifeq ($(UNAME_S), SunOS)
|
||||||
PLATFORM = solaris
|
OS_NAME = solaris
|
||||||
ARCH = $(shell uname -p)
|
OS_ARCH := $(shell $(UNAME) -p)
|
||||||
ifeq ($(ARCH), i386)
|
OS_VERSION := $(shell $(UNAME) -r)
|
||||||
ARCH=i586
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
ifeq ($(OSNAME), Linux)
|
ifeq ($(UNAME_S), Linux)
|
||||||
PLATFORM = linux
|
OS_NAME = linux
|
||||||
ARCH = $(shell uname -m)
|
OS_ARCH := $(shell $(UNAME) -m)
|
||||||
ifeq ($(ARCH), i386)
|
OS_VERSION := $(shell $(UNAME) -r)
|
||||||
ARCH=i586
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
ifndef OS_NAME
|
||||||
# Cannot trust uname output
|
ifneq ($(PROCESSOR_IDENTIFIER), )
|
||||||
ifneq ($(PROCESSOR_IDENTIFIER), )
|
OS_NAME = windows
|
||||||
PLATFORM = windows
|
SLASH_JAVA = J:
|
||||||
SLASH_JAVA = J:
|
# A variety of ways to say X64 arch :^(
|
||||||
# A variety of ways to say X64 arch :^(
|
OS_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER))
|
||||||
PROC_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER))
|
EXESUFFIX = .exe
|
||||||
PROC_ARCH:=$(subst x86,X86,$(PROC_ARCH))
|
# These need to be different depending on MKS or CYGWIN
|
||||||
PROC_ARCH:=$(subst x64,X64,$(PROC_ARCH))
|
ifeq ($(findstring cygdrive,$(shell ($(CD) C:/ && $(PWD)))), )
|
||||||
PROC_ARCH:=$(subst AMD64,X64,$(PROC_ARCH))
|
GETMIXEDPATH = dosname -s
|
||||||
PROC_ARCH:=$(subst amd64,X64,$(PROC_ARCH))
|
OS_VERSION := $(shell $(UNAME) -r)
|
||||||
PROC_ARCH:=$(subst EM64T,X64,$(PROC_ARCH))
|
|
||||||
PROC_ARCH:=$(subst em64t,X64,$(PROC_ARCH))
|
|
||||||
PROC_ARCH:=$(subst intel64,X64,$(PROC_ARCH))
|
|
||||||
PROC_ARCH:=$(subst Intel64,X64,$(PROC_ARCH))
|
|
||||||
PROC_ARCH:=$(subst INTEL64,X64,$(PROC_ARCH))
|
|
||||||
PROC_ARCH:=$(subst ia64,IA64,$(PROC_ARCH))
|
|
||||||
ifeq ($(PROC_ARCH),IA64)
|
|
||||||
ARCH = ia64
|
|
||||||
else
|
|
||||||
ifeq ($(PROC_ARCH),X64)
|
|
||||||
ARCH = x64
|
|
||||||
else
|
else
|
||||||
ARCH = i586
|
GETMIXEDPATH = cygpath -m -s
|
||||||
|
OS_VERSION := $(shell $(UNAME) -s | $(CUT) -d'-' -f2)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
EXESUFFIX = .exe
|
endif
|
||||||
# These need to be different depending on MKS or CYGWIN
|
|
||||||
ifeq ($(findstring cygdrive,$(shell (cd C:/ && pwd))), )
|
# Only want major and minor numbers from os version
|
||||||
GETMIXEDPATH=dosname -s
|
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))
|
||||||
|
OS_ARCH:=$(subst IA64,ia64,$(OS_ARCH))
|
||||||
|
OS_ARCH:=$(subst X86,i586,$(OS_ARCH))
|
||||||
|
OS_ARCH:=$(subst x86,i586,$(OS_ARCH))
|
||||||
|
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
|
||||||
|
ifndef ARCH_DATA_MODEL
|
||||||
|
ARCH_DATA_MODEL=32
|
||||||
|
endif
|
||||||
|
ARCH_DATA_MODEL_ERROR= \
|
||||||
|
ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) cannot be used with $(OS_NAME)-$(ARCH)
|
||||||
|
ifeq ($(ARCH_DATA_MODEL),64)
|
||||||
|
ifeq ($(OS_NAME)-$(OS_ARCH),solaris-i586)
|
||||||
|
OS_ARCH=x64
|
||||||
|
endif
|
||||||
|
ifeq ($(OS_NAME)-$(OS_ARCH),solaris-sparc)
|
||||||
|
OS_ARCH=sparcv9
|
||||||
|
endif
|
||||||
|
ifeq ($(OS_ARCH),i586)
|
||||||
|
x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
|
||||||
|
endif
|
||||||
|
ifeq ($(OS_ARCH),sparc)
|
||||||
|
x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
ifeq ($(ARCH_DATA_MODEL),32)
|
||||||
|
ifeq ($(OS_ARCH),x64)
|
||||||
|
x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
|
||||||
|
endif
|
||||||
|
ifeq ($(OS_ARCH),ia64)
|
||||||
|
x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
|
||||||
|
endif
|
||||||
|
ifeq ($(OS_ARCH),sparcv9)
|
||||||
|
x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
GETMIXEDPATH=cygpath -m -s
|
x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Utilities used
|
|
||||||
CD = cd
|
|
||||||
CP = cp
|
|
||||||
ECHO = echo
|
|
||||||
MKDIR = mkdir
|
|
||||||
ZIP = zip
|
|
||||||
|
|
||||||
# Root of this test area (important to use full paths in some places)
|
# Root of this test area (important to use full paths in some places)
|
||||||
TEST_ROOT := $(shell pwd)
|
TEST_ROOT := $(shell $(PWD))
|
||||||
|
|
||||||
# Root of all test results
|
# Root of all test results
|
||||||
ifdef ALT_OUTPUTDIR
|
ifdef ALT_OUTPUTDIR
|
||||||
ABS_OUTPUTDIR = $(ALT_OUTPUTDIR)
|
ABS_OUTPUTDIR = $(ALT_OUTPUTDIR)
|
||||||
else
|
else
|
||||||
ABS_OUTPUTDIR = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)
|
ABS_OUTPUTDIR = $(TEST_ROOT)/../build/$(OS_NAME)-$(OS_ARCH)
|
||||||
endif
|
endif
|
||||||
ABS_BUILD_ROOT = $(ABS_OUTPUTDIR)
|
ABS_BUILD_ROOT = $(ABS_OUTPUTDIR)
|
||||||
ABS_TEST_OUTPUT_DIR := $(ABS_BUILD_ROOT)/testoutput
|
ABS_TEST_OUTPUT_DIR := $(ABS_BUILD_ROOT)/testoutput/$(UNIQUE_DIR)
|
||||||
|
|
||||||
# Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test)
|
# Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test)
|
||||||
ifndef PRODUCT_HOME
|
ifndef PRODUCT_HOME
|
||||||
@ -114,13 +172,14 @@ ifndef PRODUCT_HOME
|
|||||||
if [ -d $(ABS_JDK_IMAGE) ] ; then \
|
if [ -d $(ABS_JDK_IMAGE) ] ; then \
|
||||||
$(ECHO) "$(ABS_JDK_IMAGE)"; \
|
$(ECHO) "$(ABS_JDK_IMAGE)"; \
|
||||||
else \
|
else \
|
||||||
$(ECHO) "$(ABS_BUILD_ROOT)" ; \
|
$(ECHO) "$(ABS_BUILD_ROOT)"; \
|
||||||
fi)
|
fi)
|
||||||
PRODUCT_HOME := $(PRODUCT_HOME)
|
PRODUCT_HOME := $(PRODUCT_HOME)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.)
|
# Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.)
|
||||||
# Should be passed into 'java' only.
|
# Should be passed into 'java' only.
|
||||||
|
# Could include: -d64 -server -client OR any java option
|
||||||
ifdef JPRT_PRODUCT_ARGS
|
ifdef JPRT_PRODUCT_ARGS
|
||||||
JAVA_ARGS = $(JPRT_PRODUCT_ARGS)
|
JAVA_ARGS = $(JPRT_PRODUCT_ARGS)
|
||||||
endif
|
endif
|
||||||
@ -131,18 +190,131 @@ ifdef JPRT_PRODUCT_VM_ARGS
|
|||||||
JAVA_VM_ARGS = $(JPRT_PRODUCT_VM_ARGS)
|
JAVA_VM_ARGS = $(JPRT_PRODUCT_VM_ARGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Check JAVA_ARGS arguments based on ARCH_DATA_MODEL etc.
|
||||||
|
ifeq ($(OS_NAME),solaris)
|
||||||
|
D64_ERROR_MESSAGE=Mismatch between ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) and use of -d64 in JAVA_ARGS=$(JAVA_ARGS)
|
||||||
|
ifeq ($(ARCH_DATA_MODEL),32)
|
||||||
|
ifneq ($(findstring -d64,$(JAVA_ARGS)),)
|
||||||
|
x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)")
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifeq ($(ARCH_DATA_MODEL),64)
|
||||||
|
ifeq ($(findstring -d64,$(JAVA_ARGS)),)
|
||||||
|
x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)")
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
|
# Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
|
||||||
ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip
|
ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip
|
||||||
ifdef JPRT_ARCHIVE_BUNDLE
|
ifdef JPRT_ARCHIVE_BUNDLE
|
||||||
ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE)
|
ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# DISPLAY settings for virtual frame buffer
|
||||||
|
START_XVFB = start-Xvfb.sh
|
||||||
|
NOHUP_OUTPUT = $(ABS_TEST_OUTPUT_DIR)/start-Xvfb.nohup-output.txt
|
||||||
|
DISPLAY_PID_FILE=$(ABS_TEST_OUTPUT_DIR)/xvfb-display-number.txt
|
||||||
|
DISPLAY_SLEEP_TIME=10
|
||||||
|
DISPLAY_MAX_SLEEPS=10
|
||||||
|
ifeq ($(OS_NAME),solaris)
|
||||||
|
VIRTUAL_FRAME_BUFFER = true
|
||||||
|
endif
|
||||||
|
ifeq ($(OS_NAME),linux)
|
||||||
|
VIRTUAL_FRAME_BUFFER = true
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Does not work yet, display dies as soon as it gets used. :^(
|
||||||
|
VIRTUAL_FRAME_BUFFER = false
|
||||||
|
|
||||||
|
# Are we using a VIRTUAL_FRAME_BUFFER (Xvfb)
|
||||||
|
ifeq ($(VIRTUAL_FRAME_BUFFER),true)
|
||||||
|
|
||||||
|
PREP_DISPLAY = \
|
||||||
|
$(CP) $(START_XVFB) $(ABS_TEST_OUTPUT_DIR); \
|
||||||
|
$(CHMOD) a+x $(ABS_TEST_OUTPUT_DIR)/$(START_XVFB); \
|
||||||
|
( $(CD) $(ABS_TEST_OUTPUT_DIR) && \
|
||||||
|
$(NOHUP) $(ABS_TEST_OUTPUT_DIR)/$(START_XVFB) $(DISPLAY_PID_FILE) > $(NOHUP_OUTPUT) 2>&1 && \
|
||||||
|
$(SLEEP) $(DISPLAY_SLEEP_TIME) ) & \
|
||||||
|
count=1; \
|
||||||
|
while [ ! -s $(DISPLAY_PID_FILE) ] ; do \
|
||||||
|
$(ECHO) "Sleeping $(DISPLAY_SLEEP_TIME) more seconds, DISPLAY not ready"; \
|
||||||
|
$(SLEEP) $(DISPLAY_SLEEP_TIME); \
|
||||||
|
count=`$(EXPR) $${count} '+' 1`; \
|
||||||
|
if [ $${count} -gt $(DISPLAY_MAX_SLEEPS) ] ; then \
|
||||||
|
$(ECHO) "ERROR: DISPLAY not ready, giving up on DISPLAY"; \
|
||||||
|
exit 9; \
|
||||||
|
fi; \
|
||||||
|
done ; \
|
||||||
|
DISPLAY=":`$(CAT) $(DISPLAY_PID_FILE)`"; \
|
||||||
|
export DISPLAY; \
|
||||||
|
$(CAT) $(NOHUP_OUTPUT); \
|
||||||
|
$(ECHO) "Prepared DISPLAY=$${DISPLAY}"; \
|
||||||
|
$(XHOST) || \
|
||||||
|
( $(ECHO) "ERROR: No display" ; exit 8)
|
||||||
|
|
||||||
|
KILL_DISPLAY = \
|
||||||
|
( \
|
||||||
|
DISPLAY=":`$(CAT) $(DISPLAY_PID_FILE)`"; \
|
||||||
|
export DISPLAY; \
|
||||||
|
if [ -s "$(DISPLAY_PID_FILE)" ] ; then \
|
||||||
|
$(KILL) `$(CAT) $(DISPLAY_PID_FILE)` > /dev/null 2>&1; \
|
||||||
|
$(KILL) -9 `$(CAT) $(DISPLAY_PID_FILE)` > /dev/null 2>&1; \
|
||||||
|
fi; \
|
||||||
|
$(ECHO) "Killed DISPLAY=$${DISPLAY}"; \
|
||||||
|
)
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
PREP_DISPLAY = $(ECHO) "VIRTUAL_FRAME_BUFFER=$(VIRTUAL_FRAME_BUFFER)"
|
||||||
|
KILL_DISPLAY = $(ECHO) "VIRTUAL_FRAME_BUFFER=$(VIRTUAL_FRAME_BUFFER)"
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
# How to create the test bundle (pass or fail, we want to create this)
|
# How to create the test bundle (pass or fail, we want to create this)
|
||||||
# Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed.
|
# Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed.
|
||||||
ZIP_UP_RESULTS = ( $(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)` \
|
ZIP_UP_RESULTS = ( $(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)` \
|
||||||
&& $(CD) $(ABS_TEST_OUTPUT_DIR) \
|
&& $(CD) $(ABS_TEST_OUTPUT_DIR) \
|
||||||
&& $(ZIP) -q -r $(ARCHIVE_BUNDLE) . )
|
&& $(ZIP) -q -r $(ARCHIVE_BUNDLE) . )
|
||||||
BUNDLE_UP_AND_EXIT = ( exitCode=$$? && $(ZIP_UP_RESULTS) && exit $${exitCode} )
|
SUMMARY_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport/text/summary.txt
|
||||||
|
STATS_TXT_NAME = Stats.txt
|
||||||
|
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
|
||||||
|
BUNDLE_UP_AND_EXIT = \
|
||||||
|
( \
|
||||||
|
exitCode=$$? && \
|
||||||
|
_summary="$(SUMMARY_TXT)"; \
|
||||||
|
$(RM) -f $(STATS_TXT) $(RUNLIST) $(PASSLIST) $(FAILLIST); \
|
||||||
|
if [ -r "$${_summary}" ] ; then \
|
||||||
|
$(ECHO) "Summary: $${_summary}" > $(STATS_TXT); \
|
||||||
|
$(EXPAND) $${_summary} | $(EGREP) -v ' Not run\.' > $(RUNLIST); \
|
||||||
|
$(EGREP) ' Passed\.' $(RUNLIST) \
|
||||||
|
| $(EGREP) -v ' Error\.' \
|
||||||
|
| $(EGREP) -v ' Failed\.' > $(PASSLIST); \
|
||||||
|
( $(EGREP) ' Failed\.' $(RUNLIST); \
|
||||||
|
$(EGREP) ' Error\.' $(RUNLIST); \
|
||||||
|
$(EGREP) -v ' Passed\.' $(RUNLIST) ) \
|
||||||
|
| $(SORT) | $(UNIQ) > $(FAILLIST); \
|
||||||
|
if [ $${exitCode} != 0 -o -s $(FAILLIST) ] ; then \
|
||||||
|
$(EXPAND) $(FAILLIST) \
|
||||||
|
| $(CUT) -d' ' -f1 \
|
||||||
|
| $(SED) -e 's@^@FAILED: @' >> $(STATS_TXT); \
|
||||||
|
fi; \
|
||||||
|
runc="`$(CAT) $(RUNLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
|
||||||
|
passc="`$(CAT) $(PASSLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
|
||||||
|
failc="`$(CAT) $(FAILLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
|
||||||
|
exclc="`$(CAT) $(EXCLUDELIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
|
||||||
|
$(ECHO) "TEST STATS: run=$${runc} pass=$${passc} fail=$${failc} excluded=$${exclc}" \
|
||||||
|
>> $(STATS_TXT); \
|
||||||
|
else \
|
||||||
|
$(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \
|
||||||
|
fi; \
|
||||||
|
$(CAT) $(STATS_TXT); \
|
||||||
|
$(ZIP_UP_RESULTS) && $(KILL_DISPLAY) && \
|
||||||
|
exit $${exitCode} \
|
||||||
|
)
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
|
|
||||||
@ -172,32 +344,239 @@ endif
|
|||||||
|
|
||||||
# Expect JPRT to set TESTDIRS to the jtreg test dirs
|
# Expect JPRT to set TESTDIRS to the jtreg test dirs
|
||||||
ifndef TESTDIRS
|
ifndef TESTDIRS
|
||||||
TESTDIRS = demo/jvmti/gctest demo/jvmti/hprof
|
TESTDIRS = demo
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Samevm settings (default is false)
|
||||||
|
ifndef USE_JTREG_SAMEVM
|
||||||
|
USE_JTREG_SAMEVM=false
|
||||||
|
endif
|
||||||
|
# With samevm, you cannot use -javaoptions?
|
||||||
|
ifeq ($(USE_JTREG_SAMEVM),true)
|
||||||
|
EXTRA_JTREG_OPTIONS += -samevm $(JAVA_ARGS) $(JAVA_ARGS:%=-vmoption:%)
|
||||||
|
JTREG_TEST_OPTIONS = $(JAVA_VM_ARGS:%=-vmoption:%)
|
||||||
|
else
|
||||||
|
JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Some tests annoy me and fail frequently
|
||||||
|
PROBLEM_LIST=ProblemList.txt
|
||||||
|
EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt
|
||||||
|
|
||||||
|
# Create exclude list for this platform and arch
|
||||||
|
ifdef NO_EXCLUDES
|
||||||
|
$(EXCLUDELIST): $(PROBLEM_LIST) $(TESTDIRS)
|
||||||
|
@$(ECHO) "NOTHING_EXCLUDED" > $@
|
||||||
|
else
|
||||||
|
$(EXCLUDELIST): $(PROBLEM_LIST) $(TESTDIRS)
|
||||||
|
@$(RM) $@ $@.temp1 $@.temp2
|
||||||
|
@( ( $(EGREP) -- '$(OS_NAME)-all' $< ) ;\
|
||||||
|
( $(EGREP) -- '$(OS_NAME)-$(OS_ARCH)' $< ) ;\
|
||||||
|
( $(EGREP) -- '$(OS_NAME)-$(OS_VERSION)' $< ) ;\
|
||||||
|
( $(EGREP) -- 'generic-$(OS_ARCH)' $< ) ;\
|
||||||
|
( $(EGREP) -- 'generic-all' $< ) ;\
|
||||||
|
( $(ECHO) "#") ;\
|
||||||
|
) | $(SED) -e 's@^[\ ]*@@' \
|
||||||
|
| $(EGREP) -v '^#' > $@.temp1
|
||||||
|
@for tdir in $(TESTDIRS) ; do \
|
||||||
|
( ( $(CAT) $@.temp1 | $(EGREP) "^$${tdir}" ) ; $(ECHO) "#" ) >> $@.temp2 ; \
|
||||||
|
done
|
||||||
|
@$(ECHO) "# at least one line" >> $@.temp2
|
||||||
|
@( $(EGREP) -v '^#' $@.temp2 ; true ) > $@
|
||||||
|
@$(ECHO) "Excluding list contains `$(EXPAND) $@ | $(WC) -l` items"
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Running batches of tests with or without samevm
|
||||||
|
define RunSamevmBatch
|
||||||
|
$(ECHO) "Running tests in samevm mode: $?"
|
||||||
|
$(MAKE) TESTDIRS="$?" USE_JTREG_SAMEVM=true UNIQUE_DIR=$@ jtreg_tests
|
||||||
|
endef
|
||||||
|
define RunOthervmBatch
|
||||||
|
$(ECHO) "Running tests in othervm mode: $?"
|
||||||
|
$(MAKE) TESTDIRS="$?" USE_JTREG_SAMEVM=false UNIQUE_DIR=$@ jtreg_tests
|
||||||
|
endef
|
||||||
|
define SummaryInfo
|
||||||
|
$(ECHO) "Summary for: $?"
|
||||||
|
$(CAT) $(?:%=$(ABS_TEST_OUTPUT_DIR)/%/$(STATS_TXT_NAME))
|
||||||
|
endef
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Batches of tests (somewhat arbitrary assigments to jdk_* targets)
|
||||||
|
JDK_ALL_TARGETS =
|
||||||
|
|
||||||
|
# Stable othervm testruns (minus items from PROBLEM_LIST)
|
||||||
|
# Using samevm has problems, and doesn't help performance as much as others.
|
||||||
|
JDK_ALL_TARGETS += jdk_awt
|
||||||
|
jdk_awt: com/sun/awt java/awt sun/awt
|
||||||
|
$(call RunOthervmBatch)
|
||||||
|
|
||||||
|
# Stable samevm testruns (minus items from PROBLEM_LIST)
|
||||||
|
JDK_ALL_TARGETS += jdk_beans1
|
||||||
|
jdk_beans1: java/beans/beancontext java/beans/PropertyChangeSupport \
|
||||||
|
java/beans/Introspector java/beans/Performance \
|
||||||
|
java/beans/VetoableChangeSupport java/beans/Statement
|
||||||
|
$(call RunSamevmBatch)
|
||||||
|
|
||||||
|
# Stable othervm testruns (minus items from PROBLEM_LIST)
|
||||||
|
# Using samevm has serious problems with these tests
|
||||||
|
JDK_ALL_TARGETS += jdk_beans2
|
||||||
|
jdk_beans2: java/beans/Beans java/beans/EventHandler java/beans/XMLDecoder \
|
||||||
|
java/beans/PropertyEditor
|
||||||
|
$(call RunOthervmBatch)
|
||||||
|
JDK_ALL_TARGETS += jdk_beans3
|
||||||
|
jdk_beans3: java/beans/XMLEncoder
|
||||||
|
$(call RunOthervmBatch)
|
||||||
|
|
||||||
|
# Stable samevm testruns (minus items from PROBLEM_LIST)
|
||||||
|
JDK_ALL_TARGETS += jdk_io
|
||||||
|
jdk_io: java/io
|
||||||
|
$(call RunSamevmBatch)
|
||||||
|
|
||||||
|
# Stable samevm testruns (minus items from PROBLEM_LIST)
|
||||||
|
JDK_ALL_TARGETS += jdk_lang
|
||||||
|
jdk_lang: java/lang
|
||||||
|
$(call RunSamevmBatch)
|
||||||
|
|
||||||
|
# Stable othervm testruns (minus items from PROBLEM_LIST)
|
||||||
|
# Using samevm has serious problems with these tests
|
||||||
|
JDK_ALL_TARGETS += jdk_management1
|
||||||
|
jdk_management1: javax/management
|
||||||
|
$(call RunOthervmBatch)
|
||||||
|
|
||||||
|
# Stable othervm testruns (minus items from PROBLEM_LIST)
|
||||||
|
# Using samevm has serious problems with these tests
|
||||||
|
JDK_ALL_TARGETS += jdk_management2
|
||||||
|
jdk_management2: com/sun/jmx com/sun/management sun/management
|
||||||
|
$(call RunOthervmBatch)
|
||||||
|
|
||||||
|
# Stable samevm testruns (minus items from PROBLEM_LIST)
|
||||||
|
JDK_ALL_TARGETS += jdk_math
|
||||||
|
jdk_math: java/math
|
||||||
|
$(call RunSamevmBatch)
|
||||||
|
|
||||||
|
# Stable samevm testruns (minus items from PROBLEM_LIST)
|
||||||
|
JDK_ALL_TARGETS += jdk_misc
|
||||||
|
jdk_misc: demo javax/imageio javax/naming javax/print javax/script \
|
||||||
|
javax/smartcardio javax/sound com/sun/java com/sun/jndi \
|
||||||
|
com/sun/org sun/misc sun/pisces
|
||||||
|
$(call RunSamevmBatch)
|
||||||
|
|
||||||
|
# Stable samevm testruns (minus items from PROBLEM_LIST)
|
||||||
|
JDK_ALL_TARGETS += jdk_net
|
||||||
|
jdk_net: com/sun/net java/net sun/net
|
||||||
|
$(call RunSamevmBatch)
|
||||||
|
|
||||||
|
# Stable samevm testruns (minus items from PROBLEM_LIST)
|
||||||
|
JDK_ALL_TARGETS += jdk_nio1
|
||||||
|
jdk_nio1: java/nio/file
|
||||||
|
$(call RunSamevmBatch)
|
||||||
|
|
||||||
|
# Stable othervm testruns (minus items from PROBLEM_LIST)
|
||||||
|
# Using samevm has serious problems with these tests
|
||||||
|
JDK_ALL_TARGETS += jdk_nio2
|
||||||
|
jdk_nio2: java/nio/Buffer java/nio/ByteOrder \
|
||||||
|
java/nio/channels java/nio/BufferPoolMXBean java/nio/MappedByteBuffer
|
||||||
|
$(call RunOthervmBatch)
|
||||||
|
JDK_ALL_TARGETS += jdk_nio3
|
||||||
|
jdk_nio3: com/sun/nio sun/nio
|
||||||
|
$(call RunOthervmBatch)
|
||||||
|
|
||||||
|
# Stable othervm testruns (minus items from PROBLEM_LIST)
|
||||||
|
# Using samevm has serious problems with these tests
|
||||||
|
JDK_ALL_TARGETS += jdk_rmi
|
||||||
|
jdk_rmi: java/rmi javax/rmi sun/rmi
|
||||||
|
$(call RunOthervmBatch)
|
||||||
|
|
||||||
|
# Stable samevm testruns (minus items from PROBLEM_LIST)
|
||||||
|
JDK_ALL_TARGETS += jdk_security1
|
||||||
|
jdk_security1: java/security
|
||||||
|
$(call RunSamevmBatch)
|
||||||
|
|
||||||
|
# Stable othervm testruns (minus items from PROBLEM_LIST)
|
||||||
|
# Using samevm has serious problems with these tests
|
||||||
|
JDK_ALL_TARGETS += jdk_security2
|
||||||
|
jdk_security2: javax/crypto com/sun/crypto
|
||||||
|
$(call RunOthervmBatch)
|
||||||
|
JDK_ALL_TARGETS += jdk_security3
|
||||||
|
jdk_security3: com/sun/security lib/security javax/security sun/security
|
||||||
|
$(call RunOthervmBatch)
|
||||||
|
|
||||||
|
# Stable othervm testruns (minus items from PROBLEM_LIST)
|
||||||
|
# Using samevm has problems, and doesn't help performance as much as others.
|
||||||
|
JDK_ALL_TARGETS += jdk_swing
|
||||||
|
jdk_swing: javax/swing sun/java2d
|
||||||
|
$(call RunOthervmBatch)
|
||||||
|
|
||||||
|
# Stable samevm testruns (minus items from PROBLEM_LIST)
|
||||||
|
JDK_ALL_TARGETS += jdk_text
|
||||||
|
jdk_text: java/text sun/text
|
||||||
|
$(call RunSamevmBatch)
|
||||||
|
|
||||||
|
# Stable othervm testruns (minus items from PROBLEM_LIST)
|
||||||
|
# Using samevm has serious problems with these tests
|
||||||
|
JDK_ALL_TARGETS += jdk_tools1
|
||||||
|
jdk_tools1: com/sun/jdi
|
||||||
|
$(call RunOthervmBatch)
|
||||||
|
JDK_ALL_TARGETS += jdk_tools2
|
||||||
|
jdk_tools2: com/sun/tools sun/jvmstat sun/tools tools vm com/sun/servicetag com/sun/tracing
|
||||||
|
$(call RunOthervmBatch)
|
||||||
|
|
||||||
|
# Stable samevm testruns (minus items from PROBLEM_LIST)
|
||||||
|
JDK_ALL_TARGETS += jdk_util
|
||||||
|
jdk_util: java/util sun/util
|
||||||
|
$(call RunSamevmBatch)
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Run all tests
|
||||||
|
jdk_all: $(filter-out jdk_awt jdk_rmi jdk_swing, $(JDK_ALL_TARGETS))
|
||||||
|
@$(SummaryInfo)
|
||||||
|
|
||||||
|
# These are all phony targets
|
||||||
|
PHONY_LIST += $(JDK_ALL_TARGETS)
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
|
||||||
# Default JTREG to run (win32 script works for everybody)
|
# Default JTREG to run (win32 script works for everybody)
|
||||||
JTREG = $(JT_HOME)/win32/bin/jtreg
|
JTREG = $(JT_HOME)/win32/bin/jtreg
|
||||||
|
# Add any extra options (samevm etc.)
|
||||||
|
JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
|
||||||
|
# Only run automatic tests
|
||||||
|
JTREG_BASIC_OPTIONS += -a
|
||||||
|
# Report details on all failed or error tests, times too
|
||||||
|
JTREG_BASIC_OPTIONS += -v:fail,error,time
|
||||||
|
# Retain all files for failing tests
|
||||||
|
JTREG_BASIC_OPTIONS += -retain:fail,error
|
||||||
|
# Ignore tests are not run and completely silent about it
|
||||||
|
JTREG_BASIC_OPTIONS += -ignore:quiet
|
||||||
|
# Multiple by 2 the timeout numbers
|
||||||
|
JTREG_BASIC_OPTIONS += -timeoutFactor:2
|
||||||
|
# Boost the max memory for jtreg to avoid gc thrashing
|
||||||
|
JTREG_BASIC_OPTIONS += -J-Xmx512m
|
||||||
|
|
||||||
jtreg_tests: prep $(JT_HOME) $(PRODUCT_HOME) $(JTREG)
|
# Make sure jtreg exists
|
||||||
$(RM) $(JTREG).orig
|
$(JTREG): $(JT_HOME)
|
||||||
cp $(JTREG) $(JTREG).orig
|
|
||||||
$(RM) $(JTREG)
|
# Run jtreg
|
||||||
sed -e 's@-J\*@-J-*@' $(JTREG).orig > $(JTREG)
|
jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) $(EXCLUDELIST)
|
||||||
chmod a+x $(JTREG)
|
@$(EXPAND) $(EXCLUDELIST) \
|
||||||
( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)"); \
|
| $(CUT) -d' ' -f1 \
|
||||||
export JT_HOME; \
|
| $(SED) -e 's@^@Excluding: @'
|
||||||
$(shell $(GETMIXEDPATH) "$(JTREG)") \
|
( \
|
||||||
-a -v:fail,error \
|
( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)"); \
|
||||||
-ignore:quiet \
|
export JT_HOME; \
|
||||||
-timeoutFactor:2 \
|
$(PREP_DISPLAY) && \
|
||||||
$(EXTRA_JTREG_OPTIONS) \
|
$(shell $(GETMIXEDPATH) "$(JTREG)") \
|
||||||
-r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport \
|
$(JTREG_BASIC_OPTIONS) \
|
||||||
-w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork \
|
-r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport \
|
||||||
-jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \
|
-w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork \
|
||||||
$(JAVA_ARGS:%=-javaoptions:%) \
|
-jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \
|
||||||
$(JAVA_VM_ARGS:%=-vmoption:%) \
|
-exclude:$(shell $(GETMIXEDPATH) "$(EXCLUDELIST)") \
|
||||||
$(TESTDIRS) \
|
$(JTREG_TEST_OPTIONS) \
|
||||||
) ; $(BUNDLE_UP_AND_EXIT)
|
$(TESTDIRS) \
|
||||||
|
) ; $(BUNDLE_UP_AND_EXIT) \
|
||||||
|
) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt
|
||||||
|
|
||||||
PHONY_LIST += jtreg_tests
|
PHONY_LIST += jtreg_tests
|
||||||
|
|
||||||
|
1273
jdk/test/ProblemList.txt
Normal file
1273
jdk/test/ProblemList.txt
Normal file
File diff suppressed because it is too large
Load Diff
87
jdk/test/start-Xvfb.sh
Normal file
87
jdk/test/start-Xvfb.sh
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
#!/bin/sh -f
|
||||||
|
#
|
||||||
|
# Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
|
#
|
||||||
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License version 2 only, as
|
||||||
|
# published by the Free Software Foundation. Sun designates this
|
||||||
|
# particular file as subject to the "Classpath" exception as provided
|
||||||
|
# by Sun in the LICENSE file that accompanied this code.
|
||||||
|
#
|
||||||
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# version 2 for more details (a copy is included in the LICENSE file that
|
||||||
|
# accompanied this code).
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License version
|
||||||
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||||
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
#
|
||||||
|
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||||
|
# CA 95054 USA or visit www.sun.com if you need additional information or
|
||||||
|
# have any questions.
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Original Author: Tim Bell
|
||||||
|
#
|
||||||
|
usage() {
|
||||||
|
echo "Starts up an Xvfb dummy X server with fvwm2 window manager"
|
||||||
|
echo " usage:"
|
||||||
|
echo " ${0} display_number_file"
|
||||||
|
echo " display_number_file gets display number when it's ready"
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
#
|
||||||
|
currentDir=`pwd`
|
||||||
|
rm -f $1
|
||||||
|
DD=":$$"
|
||||||
|
DISPLAY=${DD}
|
||||||
|
export DISPLAY
|
||||||
|
cd /tmp
|
||||||
|
#
|
||||||
|
if [ ! -x "/usr/bin/X11/Xvfb" ]; then
|
||||||
|
# We have Solaris-flavored X windows, and the /usr/openwin Xvfb is
|
||||||
|
# a simple wrapper script around the Xsun server. Massage the
|
||||||
|
# arguments: server number must be first; others are slightly
|
||||||
|
# different.
|
||||||
|
#
|
||||||
|
# Also the default Visual Class (DirectColor) triggers an awt bug
|
||||||
|
# (probably 4131533/6505852) and some tests will loop endlessly
|
||||||
|
# when they hit the display. The workaround is:
|
||||||
|
# 1) Ask for PseudoColor instead.
|
||||||
|
# 2) Omit 32-bit depth.
|
||||||
|
/usr/bin/nohup /usr/openwin/bin/Xvfb ${DISPLAY} -dev vfb screen 0 1280x1024x24 pixdepths 8 16 24 defclass PseudoColor > ${currentDir}/nohup.$$ 2>&1 &
|
||||||
|
else
|
||||||
|
# Linux...
|
||||||
|
/usr/bin/nohup /usr/bin/X11/Xvfb -fbdir ${currentDir} -pixdepths 8 16 24 32 ${DISPLAY} > ${currentDir}/nohup.$$ 2>&1 &
|
||||||
|
fi
|
||||||
|
WM="/usr/bin/X11/fvwm2"
|
||||||
|
if [ ! -x ${WM} ] ; then
|
||||||
|
WM="/opt/sfw/bin/fvwm2"
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
# Wait for Xvfb to initialize:
|
||||||
|
sleep 5
|
||||||
|
#
|
||||||
|
if [ -x "${WM}" ]; then
|
||||||
|
# 2 JCK tests require a window manager
|
||||||
|
# mwm fails (key name errors) and twm fails (hangs),
|
||||||
|
# but fvwm2 works well.
|
||||||
|
/usr/bin/nohup ${WM} -display ${DISPLAY} -replace -f /dev/null > ${currentDir}/nohup.$$ 2>&1 &
|
||||||
|
else
|
||||||
|
echo "Error: ${WM} not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
# Wait some more to see if the xhost command gets through:
|
||||||
|
sleep 10
|
||||||
|
# Allow access to all - this is a brute force approach,
|
||||||
|
# but I do not see how it could be a security problem...
|
||||||
|
DISPLAY="${DD}" xhost +
|
||||||
|
#
|
||||||
|
echo "Virtual frame buffer started on ${DISPLAY}"
|
||||||
|
echo "$$" > $1
|
||||||
|
wait
|
Loading…
x
Reference in New Issue
Block a user