blob: 003d62bfd5f257e17779b8ffd42dbf8b96e8a48c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#
# Makefile to run jtreg
#
ifeq ($(ARCH), i386)
ARCH = i586
endif
# Root of this test area (important to use full paths in some places)
TEST_ROOT := $(shell pwd)
# Default bundle of all test results (passed or not)
JPRT_ARCHIVE_BUNDLE = $(TEST_ROOT)/JPRT_ARCHIVE_BUNDLE.zip
JT_HOME = $(TEST_ROOT)/../../jtreg
JTREG_KEY_OPTION = -k:\!ignore
JTREG_ENV_OPTION = -e:LOCALBASE=%%LOCALBASE%%
JTREG_STATUS_OPTION = -status:notRun,fail,error
# Default JTREG to run
JTREG = $(ALT_JDK_IMPORT_PATH)/bin/java -jar $(JT_HOME)/lib/jtreg.jar
# Default JDK to test
JAVA_HOME = $(TEST_ROOT)/../../build/$(PLATFORM)-$(ARCH)/j2sdk-image
# The test directories to run
TESTDIRS = com demo java javax lib sun tools vm
# Root of all test results
JTREG_OUTPUT_DIR = $(TEST_ROOT)/o_$(PLATFORM)-$(ARCH)
# Default make rule
all: clean check tests $(JPRT_ARCHIVE_BUNDLE)
@echo "Testing completed successfully"
# Chaeck to make sure these directories exist
check: $(JT_HOME) $(JAVA_HOME)
# Run the tests
tests: FRC
@mkdir -p $(JTREG_OUTPUT_DIR)
$(JTREG) -a -v:fail,error \
$(JTREG_KEY_OPTION) \
$(JTREG_ENV_OPTION) \
$(JTREG_STATUS_OPTION) \
-r:$(JTREG_OUTPUT_DIR)/JTreport \
-w:$(JTREG_OUTPUT_DIR)/JTwork \
-jdk:$(JAVA_HOME) \
$(TESTDIRS)
# Bundle up the results
$(JPRT_ARCHIVE_BUNDLE): FRC
@rm -f $@
@mkdir -p $(@D)
( cd $(JTREG_OUTPUT_DIR) && %%LOCALBASE%%/bin/zip -q -r $@ . )
# Cleanup
clean:
rm -f -r $(JTREG_OUTPUT_DIR)
rm -f $(JPRT_ARCHIVE_BUNDLE)
# Used to force a target rules to run
FRC:
# Phony targets (e.g. these are not filenames)
.PHONY: all tests clean check
|