• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("../../../test_template.gni")
15
16group("dlns_test") {
17  testonly = true
18  deps = [
19    ":dlns_dlopen_test",
20    ":dlns_dlsym_dep_a",
21    ":dlns_dlsym_test",
22    ":dlns_inherit_test",
23    ":dlns_separated_test",
24    ":dlns_set_fun_test",
25    ":dlns_special_scene_test",
26  ]
27}
28
29ohos_executable("dlns_dlopen_test") {
30  subsystem_name = "musl"
31  part_name = "libc-test"
32  include_dirs = [
33    "../common",
34    "//third_party/musl/porting/linux/user/include",
35    "//third_party/musl/libc-test/src/common",
36  ]
37
38  sources = [ "dlns_dlopen.c" ]
39  configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ]
40}
41
42ohos_executable("dlns_set_fun_test") {
43  subsystem_name = "musl"
44  part_name = "libc-test"
45  include_dirs = [
46    "../common",
47    "//third_party/musl/porting/linux/user/include",
48    "//third_party/musl/libc-test/src/common",
49  ]
50
51  sources = [ "dlns_set_fun.c" ]
52  configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ]
53  libs = [ "${musl_lib_dir}/libc.a" ]
54}
55
56ohos_executable("dlns_inherit_test") {
57  subsystem_name = "musl"
58  part_name = "libc-test"
59  include_dirs = [
60    "../common",
61    "//third_party/musl/porting/linux/user/include",
62    "//third_party/musl/libc-test/src/common",
63  ]
64
65  sources = [ "dlns_inherit.c" ]
66  configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ]
67  libs = [ "${musl_lib_dir}/libc.a" ]
68}
69
70ohos_executable("dlns_separated_test") {
71  subsystem_name = "musl"
72  part_name = "libc-test"
73  include_dirs = [
74    "../common",
75    "//third_party/musl/porting/linux/user/include",
76    "//third_party/musl/libc-test/src/common",
77  ]
78
79  sources = [ "dlns_separated.c" ]
80  configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ]
81  libs = [ "${musl_lib_dir}/libc.a" ]
82}
83
84ohos_executable("dlns_special_scene_test") {
85  subsystem_name = "musl"
86  part_name = "libc-test"
87  include_dirs = [
88    "../common",
89    "//third_party/musl/porting/linux/user/include",
90    "//third_party/musl/libc-test/src/common",
91  ]
92
93  sources = [ "dlns_special_scene.c" ]
94  configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ]
95}
96
97ohos_executable("dlns_dlsym_test") {
98  subsystem_name = "musl"
99  part_name = "libc-test"
100  include_dirs = [
101    "../common",
102    "//third_party/musl/porting/linux/user/include",
103    "//third_party/musl/libc-test/src/common",
104  ]
105
106  sources = [ "dlns_dlsym.c" ]
107  configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ]
108}
109
110ohos_shared_library("dlns_dlsym_dep_c") {
111  include_dirs = [ "." ]
112
113  sources = [ "dlns_dlsym_dep_c.c" ]
114
115  output_name = "dlns_dlsym_dep_c"
116
117  output_extension = "so"
118
119  subsystem_name = "musl"
120  part_name = "libc-test-lib"
121}
122
123ohos_shared_library("dlns_dlsym_dep_b") {
124  include_dirs = [ "." ]
125
126  sources = [ "dlns_dlsym_dep_b.c" ]
127
128  output_name = "dlns_dlsym_dep_b"
129
130  output_extension = "so"
131
132  deps = [ ":dlns_dlsym_dep_c" ]
133
134  subsystem_name = "musl"
135  part_name = "libc-test-lib"
136}
137
138ohos_shared_library("dlns_dlsym_dep_a") {
139  include_dirs = [ "." ]
140
141  sources = [ "dlns_dlsym_dep_a.c" ]
142
143  output_name = "dlns_dlsym_dep_a"
144
145  output_extension = "so"
146
147  deps = [ ":dlns_dlsym_dep_b" ]
148
149  subsystem_name = "musl"
150  part_name = "libc-test-lib"
151}
152