• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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("//base/sensors/sensor/sensor.gni")
15import("//test/xts/tools/build/suite.gni")
16module_output_path = "sensors/ActsSensorNdkTest"
17ohos_moduletest_suite("ActsSensorNdkTest") {
18  module_out_path = module_output_path
19  sources = [ "./sensor_native_test.cpp" ]
20
21  include_dirs = [
22    "$SUBSYSTEM_DIR/utils/common/include",
23    "$SUBSYSTEM_DIR/interfaces/kits/c",
24    "$SUBSYSTEM_DIR/frameworks/native/include",
25  ]
26
27  cflags = [
28    "-Werror",
29    "-fno-rtti",
30    "-fno-exceptions",
31    "-Wall",
32    "-fno-common",
33    "-fstack-protector-strong",
34    "-Wshadow",
35    "-FPIC",
36    "-FS",
37    "-O2",
38    "-D_FORTIFY_SOURCE=2",
39    "-fvisibility=hidden",
40    "-Wformat=2",
41    "-Wdate-time",
42    "",
43  ]
44
45  deps = [
46    "$SUBSYSTEM_DIR/frameworks/native:ohsensor",
47    "$SUBSYSTEM_DIR/utils/common:libsensor_utils",
48    "//third_party/googletest:gmock_main",
49    "//third_party/googletest:gtest_main",
50  ]
51  external_deps = [
52    "access_token:libaccesstoken_sdk",
53    "access_token:libnativetoken",
54    "access_token:libtoken_setproc",
55    "c_utils:utils",
56    "hilog:libhilog",
57    "ipc:ipc_core",
58  ]
59
60  part_name = "sensor"
61  subsystem_name = "sensors"
62}
63