changeset 572:354213c3c0b6

. Add BSD support. . Change default test directories to 'compiler' as its the only test directory for hotspot.
author glewis@misty.eyesbeyond.com
date Sat, 28 Feb 2009 22:19:11 -0800
parents bf07705e56fc
children 234e95005d2b
files test/Makefile test/jprt.config
diffstat 2 files changed, 45 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/test/Makefile	Sat Feb 21 11:28:21 2009 -0800
+++ b/test/Makefile	Sat Feb 28 22:19:11 2009 -0800
@@ -43,6 +43,20 @@
     ARCH = i586
   endif
 endif
+ifeq ($(OSNAME), Darwin)
+  PLATFORM = bsd
+  ARCH = $(shell uname -m)
+  ifeq ($(ARCH), i386)
+    ARCH = i586
+  endif
+endif
+ifeq ($(findstring BSD,$(OSNAME)), BSD)
+  PLATFORM = bsd
+  ARCH = $(shell uname -m)
+  ifeq ($(ARCH), i386)
+    ARCH = i586
+  endif
+endif
 ifeq ($(OSNAME), Windows_NT)
   PLATFORM = windows
   SLASH_JAVA = J:
@@ -73,7 +87,7 @@
 TEST_ROOT := $(shell pwd)
 
 # Root of all test results
-ABS_BUILD_ROOT = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)
+ABS_BUILD_ROOT = $(TEST_ROOT)/../../build/$(PLATFORM)-$(ARCH)
 ABS_TEST_OUTPUT_DIR = $(ABS_BUILD_ROOT)/testoutput
 
 # Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test)
@@ -134,7 +148,7 @@
 endif
 
 # Expect JPRT to set TESTDIRS to the jtreg test dirs
-JTREG_TESTDIRS = demo/jvmti/gctest demo/jvmti/hprof
+JTREG_TESTDIRS = compiler
 ifdef TESTDIRS
   JTREG_TESTDIRS = $(TESTDIRS)
 endif
--- a/test/jprt.config	Sat Feb 21 11:28:21 2009 -0800
+++ b/test/jprt.config	Sat Feb 28 22:19:11 2009 -0800
@@ -75,8 +75,8 @@
 
 # Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise.
 osname=`uname -s`
-if [ "${osname}" = SunOS ] ; then
-   
+case "${osname}" in
+  SunOS )
     # SOLARIS: Sparc or X86
     osarch=`uname -p`
     if [ "${osarch}" = sparc ] ; then
@@ -100,9 +100,9 @@
 
     # File creation mask
     umask 002
+    ;;
 
-elif [ "${osname}" = Linux ] ; then
-   
+  Linux | Darwin )
     # Add basic paths
     path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
 
@@ -111,9 +111,31 @@
     fileMustExist "${make}" make
 
     umask 002
+    ;;
 
-else
+  FreeBSD | OpenBSD )
+    # Add basic paths
+    path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
 
+    # Find GNU make
+    make=/usr/local/bin/gmake
+    fileMustExist "${make}" make
+
+    umask 002
+    ;;
+
+  NetBSD )
+    # Add basic paths
+    path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
+
+    # Find GNU make
+    make=/usr/pkg/bin/gmake
+    fileMustExist "${make}" make
+
+    umask 002
+    ;;
+
+  * )
     # Windows: Differs on CYGWIN vs. MKS.
    
     # We need to determine if we are running a CYGWIN shell or an MKS shell
@@ -154,8 +176,8 @@
     if [ "${unix_toolset}" = CYGWIN ] ; then
 	path4sdk="`/usr/bin/cygpath -p ${path4sdk}`"
     fi
-
-fi
+    ;;
+esac
 
 # Export PATH setting
 PATH="${path4sdk}"