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("//build/test.gni")
15
16module_out_path = "external_device_manager/unittest"
17
18ohos_js_stage_unittest("NdkPermissionJsTest") {
19  js_build_mode = "debug"
20  hap_profile = "entry/src/main/module.json"
21  deps = [
22    ":ndkpermissionjstest_js_assets",
23    ":ndkpermissionjstest_resources",
24  ]
25  ets2abc = true
26  certificate_profile = "signature/openharmony_sx.p7b"
27  hap_name = "NdkPermissionJsTest"
28  subsystem_name = "hdf"
29  part_name = "external_device_manager"
30  module_out_path = module_out_path
31  shared_libraries = [
32    "./entry/src/main/cpp:ddk_permission_js_test",
33    ":libcppsharedso",
34  ]
35}
36
37ohos_prebuilt_shared_library("libcppsharedso") {
38  source = rebase_path(libcxx_ndk_shared_file)
39  subsystem_name = "hdf"
40  part_name = "external_device_manager"
41}
42
43ohos_app_scope("ndkpermissionjstest_app_profile") {
44  app_profile = "AppScope/app.json"
45  sources = [ "AppScope/resources" ]
46}
47
48ohos_js_assets("ndkpermissionjstest_js_assets") {
49  source_dir = "entry/src/main/ets"
50}
51
52ohos_resources("ndkpermissionjstest_resources") {
53  sources = [ "entry/src/main/resources" ]
54  deps = [ ":ndkpermissionjstest_app_profile" ]
55  hap_profile = "entry/src/main/module.json"
56}
57