jdk/test/Makefile
author art
Wed, 04 Mar 2009 18:10:48 +0300
changeset 2463 c90a9d542c79
parent 2 90ce3da70b43
child 2400 0d7007d99b0f
permissions -rw-r--r--
6784816: Remove AWT tree lock from Container methods: getComponent, getComponents, getComponentCount Reviewed-by: anthony, dav
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
# Makefile to run jtreg
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# Get OS/ARCH specifics
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
OSNAME = $(shell uname -s)
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
ifeq ($(OSNAME), SunOS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
  PLATFORM = solaris
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
  JCT_PLATFORM = solaris
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
  ARCH = $(shell uname -p)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
  ifeq ($(ARCH), i386)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
    ARCH=i586
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
ifeq ($(OSNAME), Linux)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
  PLATFORM = linux
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
  JCT_PLATFORM = linux
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
  ARCH = $(shell uname -m)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
  ifeq ($(ARCH), i386)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
    ARCH=i586
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
ifeq ($(OSNAME), Windows_NT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
  PLATFORM = windows
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
  JCT_PLATFORM = win32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
  ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),ia64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
    ARCH=ia64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
    ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),AMD64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
      ARCH=x64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
    else
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
      ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
        ARCH=x64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
      else
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
        ARCH=i586
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
      endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
# Root of this test area (important to use full paths in some places)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
TEST_ROOT := $(shell pwd)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
# Default bundle of all test results (passed or not)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
JPRT_ARCHIVE_BUNDLE=$(TEST_ROOT)/JPRT_ARCHIVE_BUNDLE.zip
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
# Default home for JTREG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
  JT_HOME = J:/svc/jct-tools3.2.2_02
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
  JTREG_KEY_OPTION=-k:!ignore
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
  JT_HOME = /java/svc/jct-tools3.2.2_02
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
  JTREG_KEY_OPTION=-k:\!ignore
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
# Default JTREG to run
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
JTREG = $(JT_HOME)/$(JCT_PLATFORM)/bin/jtreg
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
# Default JDK to test
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
JAVA_HOME = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
# The test directories to run
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
DEFAULT_TESTDIRS = demo/jvmti/gctest demo/jvmti/hprof
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
TESTDIRS = $(DEFAULT_TESTDIRS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
# Root of all test results
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
JTREG_OUTPUT_DIR = $(TEST_ROOT)/o_$(PLATFORM)-$(ARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
# Export this setting and pass it in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
#JAVA_TOOL_OPTIONS = -Djava.awt.headless=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
#export JAVA_TOOL_OPTIONS
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
# Default make rule
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
all: clean check tests $(JPRT_ARCHIVE_BUNDLE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
	@echo "Testing completed successfully"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
# Chaeck to make sure these directories exist
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
check: $(JT_HOME) $(JAVA_HOME) $(JTREG)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
# Run the tests
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
tests: FRC
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
	@echo "Using export JAVA_TOOL_OPTIONS=$(JAVA_TOOL_OPTIONS)"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
	@rm -f -r $(JTREG_OUTPUT_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
	@mkdir -p $(JTREG_OUTPUT_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
	$(JTREG) -a -v:fail,error \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
          $(JTREG_KEY_OPTION) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
          -r:$(JTREG_OUTPUT_DIR)/JTreport \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
          -w:$(JTREG_OUTPUT_DIR)/JTwork \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
          -jdk:$(JAVA_HOME) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
          $(JAVA_TOOL_OPTIONS:%=-vmoption:%) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
          $(JAVA_ARGS:%=-vmoption:%) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
          $(TESTDIRS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
# Bundle up the results
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
$(JPRT_ARCHIVE_BUNDLE): FRC
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
	@rm -f $@
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
	@mkdir -p $(@D)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
	( cd $(JTREG_OUTPUT_DIR) && zip -q -r $@ . )
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
# Cleanup
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
clean:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
	rm -f -r $(JTREG_OUTPUT_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
	rm -f $(JPRT_ARCHIVE_BUNDLE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
# Used to force a target rules to run
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
FRC:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
# Phony targets (e.g. these are not filenames)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
.PHONY: all tests clean check
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110