1# Copyright (c) 2021 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/appexecfwk/standard/appexecfwk.gni") 16SUBSYSTEM_DIR = "//foundation/appexecfwk/standard" 17 18group("unittest") { 19 testonly = true 20 21 deps = [ 22 "unittest/barrier_handler_test:unittest", 23 "unittest/base_task_dispatcher_test:unittest", 24 "unittest/global_task_dispatcher_test:unittest", 25 "unittest/groupImpl_test:unittest", 26 "unittest/parallel_task_dispatcher_base_test:unittest", 27 "unittest/parallel_task_dispatcher_test:unittest", 28 "unittest/serial_task_dispatcher_test:unittest", 29 "unittest/spec_dispatcher_config_test:unittest", 30 "unittest/spec_task_dispatcher_test:unittest", 31 "unittest/sync_task_test:unittest", 32 "unittest/task_dispatcher_context_test:unittest", 33 "unittest/task_executor_test:unittest", 34 "unittest/task_handler_libevent_adapter_test:unittest", 35 "unittest/task_test:unittest", 36 "unittest/work_thread_test:unittest", 37 "unittest/worker_pool_test:unittest", 38 ] 39} 40 41config("dispatcher_test_config") { 42 configs = [] 43 44 defines = [] 45 46 include_dirs = [ 47 "${appexecfwk_path}/common/log/include", 48 "$SUBSYSTEM_DIR/interfaces/innerkits/libeventhandler/include", 49 50 "${dispatcher_path}/include/dispatcher", 51 "${dispatcher_path}/include/threading", 52 "${dispatcher_path}/include/task", 53 54 "${appexecfwk_path}/kits/appkit/native/app/include", 55 "${appexecfwk_path}/kits/appkit/native/app/include/task", 56 "$SUBSYSTEM_DIR/interfaces/innerkits/appexecfwk_base/include", 57 ] 58} 59 60ohos_source_set("dispatcher_test_source") { 61 testonly = true 62 63 sources = [] 64 65 include_dirs = [ "//third_party/json/include" ] 66 67 public_configs = [ 68 "//utils/native/base:utils_config", 69 ":dispatcher_test_config", 70 ] 71 72 public_deps = [ 73 "//third_party/googletest:gmock_main", 74 "//third_party/googletest:gtest_main", 75 "//utils/native/base:utils", 76 ] 77 78 deps = [ "//foundation/appexecfwk/standard/interfaces/innerkits/libeventhandler:libeventhandler" ] 79 80 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 81} 82