• 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("//build/test.gni")
15import("//foundation/graphic/graphic_2d/graphic_config.gni")
16
17module_out_path = "graphic_2d/graphic_2d/utils/socketpair"
18
19group("unittest") {
20  testonly = true
21  deps = [ ":socketpair_test" ]
22}
23
24## Build socketpair_test
25ohos_unittest("socketpair_test") {
26  module_out_path = module_out_path
27  sources = [ "socketpair_test.cpp" ]
28  deps = [ ":socketpair_test_common" ]
29  external_deps = [
30    "c_utils:utils",
31    "hilog:libhilog",
32    "ipc:ipc_core",
33  ]
34}
35
36config("socketpair_test_config") {
37  cflags = [
38    "-Wall",
39    "-Werror",
40    "-g3",
41    "-Dprivate=public",
42    "-Dprotected=public",
43  ]
44}
45
46ohos_static_library("socketpair_test_common") {
47  visibility = [ ":*" ]
48  testonly = true
49  public_configs = [ ":socketpair_test_config" ]
50
51  public_deps =
52      [ "$graphic_2d_root/utils/socketpair:socketpair" ]
53  external_deps = [ "googletest:gtest_main" ]
54  subsystem_name = "graphic"
55  part_name = "graphic_2d"
56}
57