15ba71b47Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd.
25ba71b47Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
35ba71b47Sopenharmony_ci# you may not use this file except in compliance with the License.
45ba71b47Sopenharmony_ci# You may obtain a copy of the License at
55ba71b47Sopenharmony_ci#
65ba71b47Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
75ba71b47Sopenharmony_ci#
85ba71b47Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
95ba71b47Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
105ba71b47Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
115ba71b47Sopenharmony_ci# See the License for the specific language governing permissions and
125ba71b47Sopenharmony_ci# limitations under the License.
135ba71b47Sopenharmony_ci
145ba71b47Sopenharmony_ciimport("//build/test.gni")
155ba71b47Sopenharmony_ci
165ba71b47Sopenharmony_cimodule_output_path = "samgr/samgr"
175ba71b47Sopenharmony_ci
185ba71b47Sopenharmony_ciohos_unittest("ParseUtilTest") {
195ba71b47Sopenharmony_ci  module_out_path = module_output_path
205ba71b47Sopenharmony_ci  resource_config_file =
215ba71b47Sopenharmony_ci      "//foundation/systemabilitymgr/samgr/test/resource/ohos_test.xml"
225ba71b47Sopenharmony_ci
235ba71b47Sopenharmony_ci  include_dirs = [
245ba71b47Sopenharmony_ci    "//foundation/systemabilitymgr/samgr/interfaces/innerkits/common/include",
255ba71b47Sopenharmony_ci    "//foundation/systemabilitymgr/samgr/utils/native/include",
265ba71b47Sopenharmony_ci  ]
275ba71b47Sopenharmony_ci
285ba71b47Sopenharmony_ci  sources = [
295ba71b47Sopenharmony_ci    "./parse_util_test.cpp",
305ba71b47Sopenharmony_ci    "//foundation/systemabilitymgr/samgr/utils/native/source/tools.cpp",
315ba71b47Sopenharmony_ci  ]
325ba71b47Sopenharmony_ci
335ba71b47Sopenharmony_ci  configs =
345ba71b47Sopenharmony_ci      [ "//foundation/systemabilitymgr/samgr/test/resource:coverage_flags" ]
355ba71b47Sopenharmony_ci
365ba71b47Sopenharmony_ci  deps = [
375ba71b47Sopenharmony_ci    "//foundation/systemabilitymgr/samgr/interfaces/innerkits/common:samgr_common",
385ba71b47Sopenharmony_ci    "//foundation/systemabilitymgr/samgr/services/common/test/mock:mock_sa",
395ba71b47Sopenharmony_ci    "//third_party/googletest:gtest_main",
405ba71b47Sopenharmony_ci  ]
415ba71b47Sopenharmony_ci
425ba71b47Sopenharmony_ci  cflags = []
435ba71b47Sopenharmony_ci  if (target_cpu == "arm") {
445ba71b47Sopenharmony_ci    cflags += [ "-DBINDER_IPC_32BIT" ]
455ba71b47Sopenharmony_ci  }
465ba71b47Sopenharmony_ci
475ba71b47Sopenharmony_ci  external_deps = [
485ba71b47Sopenharmony_ci    "c_utils:utils",
495ba71b47Sopenharmony_ci    "json:nlohmann_json_static",
505ba71b47Sopenharmony_ci  ]
515ba71b47Sopenharmony_ci}
525ba71b47Sopenharmony_ci
535ba71b47Sopenharmony_cigroup("unittest") {
545ba71b47Sopenharmony_ci  testonly = true
555ba71b47Sopenharmony_ci  deps = [ ":ParseUtilTest" ]
565ba71b47Sopenharmony_ci}
57