# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("//foundation/resourceschedule/work_scheduler/workscheduler.gni") module_output_path = "work_scheduler/work_info_unittest" ohos_systemtest("WorkSchedulerWorkInfoTest") { module_out_path = module_output_path cflags_cc = [ "-Dprivate=public", "-Dprotected=public", ] sources = [ "src/workinfo_test.cpp" ] include_dirs = [ "include" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ "${worksched_frameworks_path}:workschedclient", "${worksched_utils_path}:workschedutils", "//third_party/googletest:gtest_main", "//third_party/jsoncpp", ] external_deps = [ "ability_base:base", "ability_base:want", "c_utils:utils", "hilog:libhilog", ] } ohos_unittest("WorkSchedulerClientTest") { module_out_path = "work_scheduler/client_unittest" cflags_cc = [ "-Dprivate=public", "-Dprotected=public", ] sources = [ "src/work_sched_client_test.cpp" ] include_dirs = [ "include", "${worksched_service_path}/zidl/include", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ "${worksched_frameworks_path}:workschedclient", "${worksched_utils_path}:workschedutils", "//third_party/googletest:gtest_main", "//third_party/jsoncpp", ] external_deps = [ "ability_base:want", "ability_runtime:ability_context_native", "ability_runtime:abilitykit_native", "ability_runtime:runtime", "c_utils:utils", "hilog:libhilog", "ipc:ipc_single", "samgr:samgr_proxy", ] } group("workinfotest") { testonly = true deps = [ ":WorkSchedulerClientTest", ":WorkSchedulerWorkInfoTest", ] }