55881
|
1 |
#
|
|
2 |
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
#
|
|
5 |
# This code is free software; you can redistribute it and/or modify it
|
|
6 |
# under the terms of the GNU General Public License version 2 only, as
|
|
7 |
# published by the Free Software Foundation. Oracle designates this
|
|
8 |
# particular file as subject to the "Classpath" exception as provided
|
|
9 |
# by Oracle in the LICENSE file that accompanied this code.
|
|
10 |
#
|
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
# accompanied this code).
|
|
16 |
#
|
|
17 |
# You should have received a copy of the GNU General Public License version
|
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
#
|
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
22 |
# or visit www.oracle.com if you need additional information or have any
|
|
23 |
# questions.
|
|
24 |
#
|
|
25 |
|
|
26 |
# FIXME
|
|
27 |
export BASH := bash
|
|
28 |
|
|
29 |
# FIXME: hardcoded!
|
|
30 |
|
|
31 |
PRODUCT_HOME=/var/tmp/jib-magnusi/install/jdk/10/22/linux-x64.jdk/jdk-10
|
|
32 |
JT_JAVA=/var/tmp/jib-magnusi/install/java/re/jdk/8/promoted/latest/bundles/linux-x64/jdk-8-linux-x64.tar.gz/jdk1.8.0
|
|
33 |
TEST_IMAGE_DIR=/var/tmp/jib-magnusi/install/jdk/10/22/linux-x64.test
|
|
34 |
JT_HOME=/var/tmp/jib-magnusi/install/java/re/jtreg/4.2/promoted/all/b08/bundles/jtreg_bin-4.2.zip/jtreg
|
|
35 |
TONGA_HOME=/var/tmp/jib-magnusi/install/jpg/infra/builddeps/tonga/4.0.0_May_12_2014+1.0/tonga-4.0.0_May_12_2014+1.0.zip
|
|
36 |
TEST_OUTPUT_DIR=/tmp/ihse/test-out
|
|
37 |
|
|
38 |
|
|
39 |
# In Cygwin, the MAKE variable gets prepended with the current directory if the
|
|
40 |
# make executable is called using a Windows mixed path (c:/cygwin/bin/make.exe).
|
|
41 |
ifneq ($(findstring :, $(MAKE)), )
|
|
42 |
export MAKE := $(patsubst $(CURDIR)%, %, $(patsubst $(CURDIR)/%, %, $(MAKE)))
|
|
43 |
endif
|
|
44 |
|
|
45 |
# Locate this Makefile
|
|
46 |
ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))),)
|
|
47 |
makefile_path := $(CURDIR)/$(strip $(lastword $(MAKEFILE_LIST)))
|
|
48 |
else
|
|
49 |
makefile_path := $(lastword $(MAKEFILE_LIST))
|
|
50 |
endif
|
|
51 |
topdir := $(strip $(patsubst %/make/, %, $(dir $(makefile_path))))
|
|
52 |
|
|
53 |
################################################################################
|
|
54 |
|
|
55 |
export JDK_IMAGE_DIR := $(PRODUCT_HOME)
|
|
56 |
export BOOT_JDK := $(JT_JAVA)
|
|
57 |
export BUILD_OUTPUT := $(TEST_OUTPUT_DIR)
|
|
58 |
export TONGA_JAR := $(TONGA_HOME)/tonga.jar
|
|
59 |
|
|
60 |
# keep names, but verify
|
|
61 |
export TEST_IMAGE_DIR
|
|
62 |
export JT_HOME
|
|
63 |
|
|
64 |
export TOPDIR := $(topdir)
|
|
65 |
|
|
66 |
LOG_LEVEL:=debug
|
|
67 |
SPEC := $(topdir)/make/RunTestsPrebuiltSpec.gmk
|
|
68 |
|
|
69 |
# Now transform ourself to somewhat resembling sanity, but still just using the
|
|
70 |
# hard-coded spec
|
|
71 |
include $(SPEC)
|
|
72 |
$(info spec is $(SPEC))
|
|
73 |
include $(topdir)/make/common/MakeBase.gmk
|
|
74 |
$(info inluced)
|
|
75 |
|
|
76 |
NEW_SPEC := $(TEST_OUTPUT_DIR)/spec.gmk
|
|
77 |
|
|
78 |
define CreateNewSpec
|
|
79 |
$(if $(strip $(13)), \
|
|
80 |
$(error Internal makefile error: \
|
|
81 |
Too many arguments to macro, please update CreateNewSpec in RunTestsPrebuilt.gmk) \
|
|
82 |
) \
|
|
83 |
$(shell rm -f $(NEW_SPEC)) \
|
|
84 |
$(foreach i, 1 2 3 4 5 6 7 8 9 10 11 12, \
|
|
85 |
$(if $(strip $($i)), \
|
|
86 |
$(call AppendFile, $(strip $($i)), $(NEW_SPEC)) \
|
|
87 |
) \
|
|
88 |
)
|
|
89 |
endef
|
|
90 |
|
|
91 |
define VerifyVariable
|
|
92 |
ifeq ($$($1), )
|
|
93 |
$$(info Error: Variable $1 is missing, needed for run-tests-prebuilt)
|
|
94 |
$$(error Cannot continue.)
|
|
95 |
else
|
|
96 |
ifneq ($$(findstring $$(LOG_LEVEL), debug trace), )
|
|
97 |
$$(info Prebuilt variable $1=$$($1))
|
|
98 |
endif
|
|
99 |
endif
|
|
100 |
endef
|
|
101 |
|
|
102 |
$(eval $(call VerifyVariable,TOPDIR))
|
55882
|
103 |
$(eval $(call VerifyVariable,OUTPUTDIR))
|
55881
|
104 |
$(eval $(call VerifyVariable,BOOT_JDK))
|
|
105 |
$(eval $(call VerifyVariable,JDK_IMAGE_DIR))
|
|
106 |
$(eval $(call VerifyVariable,TEST_IMAGE_DIR))
|
|
107 |
$(eval $(call VerifyVariable,JT_HOME))
|
|
108 |
$(eval $(call VerifyVariable,TONGA_JAR))
|
|
109 |
|
|
110 |
$(call CreateNewSpec, \
|
|
111 |
# Generated file -- do not edit!, \
|
|
112 |
SPEC := $(NEW_SPEC), \
|
|
113 |
TOPDIR := $(topdir), \
|
55882
|
114 |
OUTPUTDIR := $(OUTPUTDIR), \
|
55881
|
115 |
BOOT_JDK := $(BOOT_JDK), \
|
|
116 |
JDK_IMAGE_DIR := $(JDK_IMAGE_DIR), \
|
|
117 |
TEST_IMAGE_DIR := $(TEST_IMAGE_DIR), \
|
|
118 |
JT_HOME := $(JT_HOME), \
|
|
119 |
TONGA_JAR := $(TONGA_JAR), \
|
|
120 |
include $(topdir)/make/RunTestsPrebuiltSpec.gmk, \
|
|
121 |
)
|
|
122 |
|
|
123 |
################################################################################
|
|
124 |
|
|
125 |
default: all
|
|
126 |
|
|
127 |
run-test:
|
|
128 |
@$(RM) -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error
|
|
129 |
@cd $(topdir) && $(MAKE) -r -R -j 1 -s -I make/common/ \
|
|
130 |
SPEC=$(NEW_SPEC) \
|
|
131 |
-f make/RunTests.gmk run-test TEST="$(TEST)"
|
|
132 |
@if test -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error ; then \
|
|
133 |
exit 1 ; \
|
|
134 |
fi
|
|
135 |
|
|
136 |
|
|
137 |
all: run-test
|
|
138 |
|
|
139 |
.PHONY: default all
|