Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 1 | # 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 | |
| 15 | import("perfetto.gni") |
| 16 | |
| 17 | perfetto_unittests_targets = [ |
| 18 | "gn:default_deps", |
| 19 | "gn:gtest_main", |
| 20 | "src/base:unittests", |
Lalit Maganti | 501742c | 2023-01-24 21:58:33 +0000 | [diff] [blame] | 21 | "src/base/threading:unittests", |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 22 | "src/protozero:unittests", |
Daniele Di Proietto | 6598102 | 2023-06-19 13:54:41 +0000 | [diff] [blame] | 23 | "src/shared_lib:unittests", |
Primiano Tucci | c4c063b | 2020-01-27 09:34:46 +0000 | [diff] [blame] | 24 | "src/tracing/core:unittests", |
Daniele Di Proietto | 7c05885 | 2024-01-19 13:25:40 +0000 | [diff] [blame] | 25 | "src/tracing/service:unittests", |
Alexander Timin | 02d7985 | 2021-01-15 16:31:24 +0000 | [diff] [blame] | 26 | "src/tracing:unittests", |
Florian Mayer | 8237596 | 2019-11-20 16:45:28 +0000 | [diff] [blame] | 27 | "src/profiling:unittests", |
Florian Mayer | 4dd5a1f | 2020-07-14 13:00:51 +0100 | [diff] [blame] | 28 | "src/profiling/symbolizer:unittests", |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 29 | ] |
| 30 | |
Sami Kyostila | abc57fb | 2019-09-23 15:55:14 +0100 | [diff] [blame] | 31 | if ((is_linux || is_android) && !perfetto_build_with_embedder) { |
Primiano Tucci | 84a1bf4 | 2019-09-20 15:57:06 +0100 | [diff] [blame] | 32 | # This test depends on pthread and can't run on non-Linux-based OS. |
Hector Dearman | ca27350 | 2022-05-12 08:46:34 +0100 | [diff] [blame] | 33 | perfetto_unittests_targets += [ "test/sanitizers:unittests" ] |
Primiano Tucci | 84a1bf4 | 2019-09-20 15:57:06 +0100 | [diff] [blame] | 34 | } |
Primiano Tucci | f33540e | 2019-09-19 12:35:57 +0100 | [diff] [blame] | 35 | |
Hector Dearman | 7ea83c9 | 2022-05-12 15:21:49 +0100 | [diff] [blame] | 36 | if (enable_perfetto_tools) { |
| 37 | perfetto_unittests_targets += [ "src/tools:unittests" ] |
| 38 | } |
| 39 | |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 40 | if (enable_perfetto_ipc) { |
Primiano Tucci | c4c063b | 2020-01-27 09:34:46 +0000 | [diff] [blame] | 41 | perfetto_unittests_targets += [ |
| 42 | "src/tracing/ipc:unittests", |
| 43 | "src/ipc:unittests", |
| 44 | ] |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 45 | } |
| 46 | |
| 47 | if (enable_perfetto_platform_services) { |
| 48 | perfetto_unittests_targets += [ |
| 49 | "src/perfetto_cmd:unittests", |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 50 | "src/traced/service:unittests", |
Primiano Tucci | 26ff929 | 2024-01-30 00:37:01 +0000 | [diff] [blame] | 51 | "src/kernel_utils:unittests", |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 52 | ] |
Primiano Tucci | a7f5a8e | 2021-01-02 17:10:50 +0100 | [diff] [blame] | 53 | if (enable_perfetto_traced_probes) { |
| 54 | perfetto_unittests_targets += [ |
| 55 | "src/traced/probes:unittests", |
Primiano Tucci | a7f5a8e | 2021-01-02 17:10:50 +0100 | [diff] [blame] | 56 | "src/kallsyms:unittests", |
| 57 | ] |
| 58 | } |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 59 | } |
| 60 | |
Ryan Savitski | 683b57f | 2020-02-06 22:09:19 +0000 | [diff] [blame] | 61 | if (enable_perfetto_heapprofd || enable_perfetto_traced_perf) { |
| 62 | perfetto_unittests_targets += [ "src/profiling/common:unittests" ] |
| 63 | } |
| 64 | |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 65 | if (enable_perfetto_heapprofd) { |
| 66 | perfetto_unittests_targets += [ |
| 67 | "src/profiling/memory:unittests", |
| 68 | "src/profiling/memory:ring_buffer_unittests", |
| 69 | ] |
| 70 | } |
| 71 | |
Ryan Savitski | a76b3cc | 2019-11-20 16:25:24 +0000 | [diff] [blame] | 72 | if (enable_perfetto_traced_perf) { |
| 73 | perfetto_unittests_targets += [ "src/profiling/perf:producer_unittests" ] |
| 74 | } |
| 75 | |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 76 | if (enable_perfetto_trace_processor) { |
Mikhail Khokhlov | 0f7e68d | 2020-01-16 15:39:27 +0000 | [diff] [blame] | 77 | 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 Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 82 | } |
Chinglin Yu | 5682f42 | 2023-10-13 14:28:04 +0800 | [diff] [blame] | 83 | |
| 84 | if (enable_perfetto_traced_relay) { |
| 85 | perfetto_unittests_targets += [ "src/traced_relay:unittests" ] |
| 86 | } |
Aaron Vaage | 0713057 | 2024-01-16 21:02:52 +0000 | [diff] [blame] | 87 | |
Daniele Di Proietto | b84c843 | 2024-02-26 17:32:54 +0000 | [diff] [blame] | 88 | perfetto_unittests_targets += [ "src/trace_redaction:unittests" ] |