blob: f54ef7a439e5753f8f0ba22993d1fdfed403b991 [file] [log] [blame]
Primiano Tucci02c11762019-08-30 00:57:59 +02001# Copyright (C) 2019 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15import("perfetto.gni")
16
17perfetto_unittests_targets = [
18 "gn:default_deps",
19 "gn:gtest_main",
20 "src/base:unittests",
Lalit Maganti501742c2023-01-24 21:58:33 +000021 "src/base/threading:unittests",
Primiano Tucci02c11762019-08-30 00:57:59 +020022 "src/protozero:unittests",
Daniele Di Proietto65981022023-06-19 13:54:41 +000023 "src/shared_lib:unittests",
Primiano Tuccic4c063b2020-01-27 09:34:46 +000024 "src/tracing/core:unittests",
Daniele Di Proietto7c058852024-01-19 13:25:40 +000025 "src/tracing/service:unittests",
Alexander Timin02d79852021-01-15 16:31:24 +000026 "src/tracing:unittests",
Florian Mayer82375962019-11-20 16:45:28 +000027 "src/profiling:unittests",
Florian Mayer4dd5a1f2020-07-14 13:00:51 +010028 "src/profiling/symbolizer:unittests",
Primiano Tucci02c11762019-08-30 00:57:59 +020029]
30
Sami Kyostilaabc57fb2019-09-23 15:55:14 +010031if ((is_linux || is_android) && !perfetto_build_with_embedder) {
Primiano Tucci84a1bf42019-09-20 15:57:06 +010032 # This test depends on pthread and can't run on non-Linux-based OS.
Hector Dearmanca273502022-05-12 08:46:34 +010033 perfetto_unittests_targets += [ "test/sanitizers:unittests" ]
Primiano Tucci84a1bf42019-09-20 15:57:06 +010034}
Primiano Tuccif33540e2019-09-19 12:35:57 +010035
Hector Dearman7ea83c92022-05-12 15:21:49 +010036if (enable_perfetto_tools) {
37 perfetto_unittests_targets += [ "src/tools:unittests" ]
38}
39
Primiano Tucci02c11762019-08-30 00:57:59 +020040if (enable_perfetto_ipc) {
Primiano Tuccic4c063b2020-01-27 09:34:46 +000041 perfetto_unittests_targets += [
42 "src/tracing/ipc:unittests",
43 "src/ipc:unittests",
44 ]
Primiano Tucci02c11762019-08-30 00:57:59 +020045}
46
47if (enable_perfetto_platform_services) {
48 perfetto_unittests_targets += [
49 "src/perfetto_cmd:unittests",
Primiano Tucci02c11762019-08-30 00:57:59 +020050 "src/traced/service:unittests",
Primiano Tucci26ff9292024-01-30 00:37:01 +000051 "src/kernel_utils:unittests",
Primiano Tucci02c11762019-08-30 00:57:59 +020052 ]
Primiano Tuccia7f5a8e2021-01-02 17:10:50 +010053 if (enable_perfetto_traced_probes) {
54 perfetto_unittests_targets += [
55 "src/traced/probes:unittests",
Primiano Tuccia7f5a8e2021-01-02 17:10:50 +010056 "src/kallsyms:unittests",
57 ]
58 }
Primiano Tucci02c11762019-08-30 00:57:59 +020059}
60
Ryan Savitski683b57f2020-02-06 22:09:19 +000061if (enable_perfetto_heapprofd || enable_perfetto_traced_perf) {
62 perfetto_unittests_targets += [ "src/profiling/common:unittests" ]
63}
64
Primiano Tucci02c11762019-08-30 00:57:59 +020065if (enable_perfetto_heapprofd) {
66 perfetto_unittests_targets += [
67 "src/profiling/memory:unittests",
68 "src/profiling/memory:ring_buffer_unittests",
69 ]
70}
71
Ryan Savitskia76b3cc2019-11-20 16:25:24 +000072if (enable_perfetto_traced_perf) {
73 perfetto_unittests_targets += [ "src/profiling/perf:producer_unittests" ]
74}
75
Primiano Tucci02c11762019-08-30 00:57:59 +020076if (enable_perfetto_trace_processor) {
Mikhail Khokhlov0f7e68d2020-01-16 15:39:27 +000077 perfetto_unittests_targets += [ "src/trace_processor:unittests" ]
78
79 if (enable_perfetto_trace_processor_sqlite) {
80 perfetto_unittests_targets += [ "src/trace_processor/metrics:unittests" ]
81 }
Primiano Tucci02c11762019-08-30 00:57:59 +020082}
Chinglin Yu5682f422023-10-13 14:28:04 +080083
84if (enable_perfetto_traced_relay) {
85 perfetto_unittests_targets += [ "src/traced_relay:unittests" ]
86}
Aaron Vaage07130572024-01-16 21:02:52 +000087
Daniele Di Proiettob84c8432024-02-26 17:32:54 +000088perfetto_unittests_targets += [ "src/trace_redaction:unittests" ]