7152791: wbapi tests fail on cygwin
authormgerdin
Wed, 21 Mar 2012 08:34:23 +0100
changeset 12225 232f136e7b60
parent 12224 11eadfc24b15
child 12226 590560cfc997
7152791: wbapi tests fail on cygwin Summary: Detect cygwin prescence when setting up PLATFORM. Translate cygwin style paths before passing them on to jtreg. Reviewed-by: jcoomes, brutisso
hotspot/test/Makefile
--- a/hotspot/test/Makefile	Tue Mar 20 19:36:59 2012 -0700
+++ b/hotspot/test/Makefile	Wed Mar 21 08:34:23 2012 +0100
@@ -26,6 +26,8 @@
 # Makefile to run various jdk tests
 #
 
+GETMIXEDPATH=echo
+
 # Get OS/ARCH specifics
 OSNAME = $(shell uname -s)
 ifeq ($(OSNAME), SunOS)
@@ -60,7 +62,14 @@
     ARCH = i586
   endif
 endif
-ifeq ($(OSNAME), Windows_NT)
+ifeq ($(PLATFORM),)
+  # detect wether we're running in MKS or cygwin
+  ifeq ($(OSNAME), Windows_NT) # MKS
+    GETMIXEDPATH=dosname -s
+  endif
+  ifeq ($(findstring CYGWIN,$(OSNAME)), CYGWIN)
+    GETMIXEDPATH=cygpath -m -s
+  endif
   PLATFORM = windows
   SLASH_JAVA = J:
   ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),ia64)
@@ -234,11 +243,11 @@
 	$(JTREG) -a -v:fail,error               \
           $(JTREG_KEY_OPTION)                   \
           $(EXTRA_JTREG_OPTIONS)                \
-          -r:$(ABS_TEST_OUTPUT_DIR)/JTreport    \
-          -w:$(ABS_TEST_OUTPUT_DIR)/JTwork      \
-          -jdk:$(PRODUCT_HOME)                  \
+          -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport    \
+          -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork      \
+          -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")                  \
           $(JAVA_OPTIONS:%=-vmoption:%)         \
-          $(TEST_ROOT)/sanity                   \
+          $(shell $(GETMIXEDPATH) "$(TEST_ROOT)")/sanity                   \
 	  || $(BUNDLE_UP_FAILED)
 	$(BUNDLE_UP)