jdk

Форк
0
/
JtregNativeLibTest.gmk 
92 строки · 3.7 Кб
1
#
2
# Copyright (c) 2020, 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
################################################################################
27
# This file builds the native component of the JTReg tests for testlibrary.
28
# It also covers the test-image part, where the built files are copied to the
29
# test image.
30
################################################################################
31

32
default: all
33

34
include $(SPEC)
35
include MakeBase.gmk
36

37
include CopyFiles.gmk
38
include TestFilesCompilation.gmk
39

40
$(eval $(call IncludeCustomExtension, test/JtregNativeLibTest.gmk))
41

42
################################################################################
43
# Targets for building the native tests themselves.
44
################################################################################
45

46
# This might have been added to by a custom extension.
47
BUILD_LIBTEST_JTREG_NATIVE_SRC += $(TOPDIR)/test/lib-test
48

49
BUILD_LIBTEST_JTREG_OUTPUT_DIR := $(OUTPUTDIR)/support/test/lib-test/jtreg/native
50

51
BUILD_LIBTEST_JTREG_IMAGE_DIR := $(TEST_IMAGE_DIR)/lib-test/jtreg
52

53
BUILD_LIBTEST_JTREG_EXECUTABLES_JDK_LIBS_exejvm-test-launcher := java.base:libjvm
54

55
# This evaluation is expensive and should only be done if this target was
56
# explicitly called.
57
ifneq ($(filter build-test-libtest-jtreg-native, $(MAKECMDGOALS)), )
58
  $(eval $(call SetupTestFilesCompilation, BUILD_LIBTEST_JTREG_LIBRARIES, \
59
      TYPE := LIBRARY, \
60
      SOURCE_DIRS := $(BUILD_LIBTEST_JTREG_NATIVE_SRC), \
61
      OUTPUT_DIR := $(BUILD_LIBTEST_JTREG_OUTPUT_DIR), \
62
      EXCLUDE := $(BUILD_LIBTEST_JTREG_EXCLUDE), \
63
  ))
64

65
  $(eval $(call SetupTestFilesCompilation, BUILD_LIBTEST_JTREG_EXECUTABLES, \
66
      TYPE := PROGRAM, \
67
      SOURCE_DIRS := $(BUILD_LIBTEST_JTREG_NATIVE_SRC), \
68
      OUTPUT_DIR := $(BUILD_LIBTEST_JTREG_OUTPUT_DIR), \
69
      EXCLUDE := $(BUILD_LIBTEST_JTREG_EXCLUDE), \
70
  ))
71
endif
72

73
build-test-libtest-jtreg-native: $(BUILD_LIBTEST_JTREG_LIBRARIES) $(BUILD_LIBTEST_JTREG_EXECUTABLES)
74

75
################################################################################
76
# Targets for building test-image.
77
################################################################################
78

79
# Copy to lib-test jtreg test image
80
$(eval $(call SetupCopyFiles, COPY_LIBTEST_JTREG_NATIVE, \
81
    SRC := $(BUILD_LIBTEST_JTREG_OUTPUT_DIR), \
82
    DEST := $(TEST_IMAGE_DIR)/lib-test/jtreg/native, \
83
    FILES := $(wildcard $(addprefix $(BUILD_LIBTEST_JTREG_OUTPUT_DIR), /bin/* /lib/*)), \
84
    FLATTEN := true, \
85
))
86

87
test-image-libtest-jtreg-native: $(COPY_LIBTEST_JTREG_NATIVE)
88

89
all: build-test-libtest-jtreg-native
90
test-image: test-image-libtest-jtreg-native
91

92
.PHONY: default all build-test-libtest-jtreg-native test-image-libtest-jtreg-native test-image
93

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.