xref: /developtools/profiler/device/BUILD.gn (revision 06f6ba60)
106f6ba60Sopenharmony_ci# Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved.
206f6ba60Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
306f6ba60Sopenharmony_ci# you may not use this file except in compliance with the License.
406f6ba60Sopenharmony_ci# You may obtain a copy of the License at
506f6ba60Sopenharmony_ci#
606f6ba60Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
706f6ba60Sopenharmony_ci#
806f6ba60Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
906f6ba60Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1006f6ba60Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1106f6ba60Sopenharmony_ci# See the License for the specific language governing permissions and
1206f6ba60Sopenharmony_ci# limitations under the License.
1306f6ba60Sopenharmony_ci
1406f6ba60Sopenharmony_ciimport("//build/ohos.gni")
1506f6ba60Sopenharmony_ciimport("base/config.gni")
1606f6ba60Sopenharmony_cigroup("hiprofiler_targets") {
1706f6ba60Sopenharmony_ci  if (!is_emulator) {
1806f6ba60Sopenharmony_ci    deps = [
1906f6ba60Sopenharmony_ci      "cmds:hiprofiler_cmd",
2006f6ba60Sopenharmony_ci      "plugins/api:hiprofiler_plugins",
2106f6ba60Sopenharmony_ci      "plugins/cpu_plugin:cpudataplugin",
2206f6ba60Sopenharmony_ci      "plugins/diskio_plugin:diskiodataplugin",
2306f6ba60Sopenharmony_ci      "plugins/ffrt_profiler/client:libffrt_profiler",
2406f6ba60Sopenharmony_ci      "plugins/ftrace_plugin:ftrace_targets",
2506f6ba60Sopenharmony_ci      "plugins/gpu_plugin:gpudataplugin",
2606f6ba60Sopenharmony_ci      "plugins/hidump_plugin:hidumpplugin",
2706f6ba60Sopenharmony_ci      "plugins/hilog_plugin:hilogplugin",
2806f6ba60Sopenharmony_ci      "plugins/hiperf_plugin:hiperfplugin",
2906f6ba60Sopenharmony_ci      "plugins/hisysevent_plugin:hisyseventplugin",
3006f6ba60Sopenharmony_ci      "plugins/memory_plugin:memdataplugin",
3106f6ba60Sopenharmony_ci      "plugins/native_hook:malloctest_cpp",
3206f6ba60Sopenharmony_ci      "plugins/native_hook:nativetest_c",
3306f6ba60Sopenharmony_ci      "plugins/native_hook:nativetest_cpp",
3406f6ba60Sopenharmony_ci      "plugins/native_hook:nativetest_so",
3506f6ba60Sopenharmony_ci      "plugins/native_hook:statisticstest_cpp",
3606f6ba60Sopenharmony_ci      "plugins/network_plugin:networkplugin",
3706f6ba60Sopenharmony_ci      "plugins/process_plugin:processplugin",
3806f6ba60Sopenharmony_ci      "plugins/sample_plugin:sampleplugin",
3906f6ba60Sopenharmony_ci      "plugins/stream_plugin:streamplugin",
4006f6ba60Sopenharmony_ci      "plugins/xpower_plugin:xpowerplugin",
4106f6ba60Sopenharmony_ci      "services/profiler_service:hiprofilerd",
4206f6ba60Sopenharmony_ci      "services/shared_memory:shared_memory",
4306f6ba60Sopenharmony_ci    ]
4406f6ba60Sopenharmony_ci    if (target_cpu == "arm64") {
4506f6ba60Sopenharmony_ci      deps += [ "plugins/hiebpf_plugin:ebpf_targets" ]
4606f6ba60Sopenharmony_ci    }
4706f6ba60Sopenharmony_ci    if (is_ohos && use_musl && !is_asan) {
4806f6ba60Sopenharmony_ci      deps += [
4906f6ba60Sopenharmony_ci        "plugins/native_daemon:native_daemon",
5006f6ba60Sopenharmony_ci        "plugins/native_daemon:native_daemon_client",
5106f6ba60Sopenharmony_ci        "plugins/native_hook:native_hook",
5206f6ba60Sopenharmony_ci        "plugins/native_hook:perf_test_data",
5306f6ba60Sopenharmony_ci      ]
5406f6ba60Sopenharmony_ci    }
5506f6ba60Sopenharmony_ci  }
5606f6ba60Sopenharmony_ci}
5706f6ba60Sopenharmony_ci
5806f6ba60Sopenharmony_cigroup("unittest") {
5906f6ba60Sopenharmony_ci  testonly = true
6006f6ba60Sopenharmony_ci  deps = [
6106f6ba60Sopenharmony_ci    "base/test:unittest",
6206f6ba60Sopenharmony_ci    "cmds/test:unittest",
6306f6ba60Sopenharmony_ci    "plugins/api/test:unittest",
6406f6ba60Sopenharmony_ci    "plugins/cpu_plugin/test:unittest",
6506f6ba60Sopenharmony_ci    "plugins/diskio_plugin/test:unittest",
6606f6ba60Sopenharmony_ci    "plugins/ffrt_profiler/test:unittest",
6706f6ba60Sopenharmony_ci    "plugins/ftrace_plugin/test:unittest",
6806f6ba60Sopenharmony_ci    "plugins/gpu_plugin/test:unittest",
6906f6ba60Sopenharmony_ci    "plugins/hidump_plugin/test:unittest",
7006f6ba60Sopenharmony_ci    "plugins/hilog_plugin/test:unittest",
7106f6ba60Sopenharmony_ci    "plugins/hiperf_plugin/test:unittest",
7206f6ba60Sopenharmony_ci    "plugins/hisysevent_plugin/test:unittest",
7306f6ba60Sopenharmony_ci    "plugins/memory_plugin/test:unittest",
7406f6ba60Sopenharmony_ci    "plugins/network_plugin/test:unittest",
7506f6ba60Sopenharmony_ci    "plugins/process_plugin/test:unittest",
7606f6ba60Sopenharmony_ci    "plugins/xpower_plugin/test:unittest",
7706f6ba60Sopenharmony_ci    "services/ipc/test:unittest",
7806f6ba60Sopenharmony_ci    "services/plugin_service/test:unittest",
7906f6ba60Sopenharmony_ci    "services/profiler_service/test:unittest",
8006f6ba60Sopenharmony_ci    "services/shared_memory/test:unittest",
8106f6ba60Sopenharmony_ci  ]
8206f6ba60Sopenharmony_ci  if (is_ohos && use_musl && !is_asan) {
8306f6ba60Sopenharmony_ci    deps += [
8406f6ba60Sopenharmony_ci      "plugins/native_daemon/native_memory_profiler_sa/test:unittest",
8506f6ba60Sopenharmony_ci      "plugins/native_daemon/test:unittest",
8606f6ba60Sopenharmony_ci      "plugins/native_hook/test:unittest",
8706f6ba60Sopenharmony_ci    ]
8806f6ba60Sopenharmony_ci  }
8906f6ba60Sopenharmony_ci}
9006f6ba60Sopenharmony_ci
9106f6ba60Sopenharmony_cigroup("fuzztest") {
9206f6ba60Sopenharmony_ci  testonly = true
9306f6ba60Sopenharmony_ci  deps = [
9406f6ba60Sopenharmony_ci    "plugins/api/test/fuzztest/plugincreatesessioncmd_fuzzer:fuzztest",
9506f6ba60Sopenharmony_ci    "plugins/api/test/fuzztest/plugindestroysessioncmd_fuzzer:fuzztest",
9606f6ba60Sopenharmony_ci    "plugins/api/test/fuzztest/pluginstartsessioncmd_fuzzer:fuzztest",
9706f6ba60Sopenharmony_ci    "plugins/api/test/fuzztest/pluginstopsessioncmd_fuzzer:fuzztest",
9806f6ba60Sopenharmony_ci    "plugins/cpu_plugin/test/fuzztest/cpustartplugin_fuzzer:fuzztest",
9906f6ba60Sopenharmony_ci    "plugins/diskio_plugin/test/fuzztest/diskiostartplugin_fuzzer:fuzztest",
10006f6ba60Sopenharmony_ci    "plugins/hidump_plugin/test/fuzztest/hidumpstartplugin_fuzzer:fuzztest",
10106f6ba60Sopenharmony_ci    "plugins/hilog_plugin/test/fuzztest/hilogstartplugin_fuzzer:fuzztest",
10206f6ba60Sopenharmony_ci    "plugins/hiperf_plugin/test/fuzztest/hiperfstartplugin_fuzzer:fuzztest",
10306f6ba60Sopenharmony_ci    "plugins/memory_plugin/test/fuzztest/memorystartplugin_fuzzer:fuzztest",
10406f6ba60Sopenharmony_ci    "plugins/native_daemon/native_memory_profiler_sa/test/fuzztest/nativedaemonsa_fuzzer:fuzztest",
10506f6ba60Sopenharmony_ci    "plugins/network_plugin/test/fuzztest/networkstartplugin_fuzzer:fuzztest",
10606f6ba60Sopenharmony_ci    "services/profiler_service/test/fuzztest/profilercreatesession_fuzzer:fuzztest",
10706f6ba60Sopenharmony_ci    "services/profiler_service/test/fuzztest/profilerdestroysession_fuzzer:fuzztest",
10806f6ba60Sopenharmony_ci    "services/profiler_service/test/fuzztest/profilerfetchdata_fuzzer:fuzztest",
10906f6ba60Sopenharmony_ci    "services/profiler_service/test/fuzztest/profilergetcapabilities_fuzzer:fuzztest",
11006f6ba60Sopenharmony_ci    "services/profiler_service/test/fuzztest/profilerkeepsession_fuzzer:fuzztest",
11106f6ba60Sopenharmony_ci    "services/profiler_service/test/fuzztest/profilerstartsession_fuzzer:fuzztest",
11206f6ba60Sopenharmony_ci    "services/profiler_service/test/fuzztest/profilerstopsession_fuzzer:fuzztest",
11306f6ba60Sopenharmony_ci  ]
11406f6ba60Sopenharmony_ci}
115