blob: 03fbe6af8cfebee636a974a5f0399e877d2ef7c5 [file] [log] [blame]
# Copyright (C) 2024 The Android Open Source Project
#
# 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("../../gn/test.gni")
# The main entry point for external processes. This is separate from
# "trace_redaction" because tests also depend on "trace_redaction".
executable("trace_redactor") {
sources = [ "main.cc" ]
deps = [
":trace_redaction",
"../../gn:default_deps",
"../../include/perfetto/base",
"../../include/perfetto/ext/base",
]
}
source_set("trace_redaction") {
sources = [
"collect_frame_cookies.cc",
"collect_frame_cookies.h",
"collect_system_info.cc",
"collect_system_info.h",
"collect_timeline_events.cc",
"collect_timeline_events.h",
"filter_packet_using_allowlist.cc",
"filter_packet_using_allowlist.h",
"filtering.cc",
"filtering.h",
"find_package_uid.cc",
"find_package_uid.h",
"frame_cookie.h",
"modify_process_trees.cc",
"modify_process_trees.h",
"populate_allow_lists.cc",
"populate_allow_lists.h",
"process_thread_timeline.cc",
"process_thread_timeline.h",
"proto_util.cc",
"proto_util.h",
"prune_package_list.cc",
"prune_package_list.h",
"redact_ftrace_events.cc",
"redact_ftrace_events.h",
"redact_process_events.cc",
"redact_process_events.h",
"redact_process_trees.cc",
"redact_process_trees.h",
"redact_sched_events.cc",
"redact_sched_events.h",
"scrub_process_stats.cc",
"scrub_process_stats.h",
"scrub_trace_packet.cc",
"scrub_trace_packet.h",
"trace_redaction_framework.cc",
"trace_redaction_framework.h",
"trace_redactor.cc",
"trace_redactor.h",
"verify_integrity.cc",
"verify_integrity.h",
]
deps = [
"../../gn:default_deps",
"../../include/perfetto/base",
"../../include/perfetto/ext/base",
"../../include/perfetto/protozero:protozero",
"../../include/perfetto/trace_processor:storage",
"../../protos/perfetto/trace:non_minimal_zero",
"../../protos/perfetto/trace/android:zero",
"../../protos/perfetto/trace/ftrace:zero",
"../../protos/perfetto/trace/ps:zero",
"../trace_processor:storage_minimal",
"../trace_processor/util:util",
]
}
source_set("integrationtests") {
testonly = true
sources = [
"filter_ftrace_using_allowlist_integrationtest.cc",
"filter_sched_waking_events_integrationtest.cc",
"filter_task_rename_integrationtest.cc",
"process_thread_timeline_integrationtest.cc",
"prune_package_list_integrationtest.cc",
"redact_process_trees_integrationtest.cc",
"redact_sched_events_integrationtest.cc",
"scrub_ftrace_events_integrationtest.cc",
"scrub_process_stats_integrationtest.cc",
"trace_redaction_integration_fixture.cc",
"trace_redaction_integration_fixture.h",
"verify_integrity_integrationtest.cc",
]
deps = [
":trace_redaction",
"../../gn:default_deps",
"../../gn:gtest_and_gmock",
"../../include/perfetto/ext/base",
"../../protos/perfetto/trace:non_minimal_cpp",
"../../protos/perfetto/trace:non_minimal_zero",
"../../protos/perfetto/trace/android:cpp",
"../../protos/perfetto/trace/android:zero",
"../../protos/perfetto/trace/ftrace:zero",
"../../protos/perfetto/trace/ps:zero",
"../base:test_support",
]
}
perfetto_unittest_source_set("unittests") {
testonly = true
sources = [
"collect_frame_cookies_unittest.cc",
"collect_system_info_unittest.cc",
"collect_timeline_events_unittest.cc",
"filter_ftrace_using_allowlist_unittest.cc",
"filter_packet_using_allowlist_unittest.cc",
"filter_sched_waking_events_unittest.cc",
"find_package_uid_unittest.cc",
"process_thread_timeline_unittest.cc",
"proto_util_unittest.cc",
"prune_package_list_unittest.cc",
"redact_process_events_unittest.cc",
"redact_sched_events_unittest.cc",
"suspend_resume_unittest.cc",
"verify_integrity_unittest.cc",
]
deps = [
":trace_redaction",
"../../gn:default_deps",
"../../gn:gtest_and_gmock",
"../../include/perfetto/ext/base:base",
"../../include/perfetto/protozero:protozero",
"../../protos/perfetto/config:cpp",
"../../protos/perfetto/config:zero",
"../../protos/perfetto/trace:non_minimal_cpp",
"../../protos/perfetto/trace:zero",
"../../protos/perfetto/trace/android:cpp",
"../../protos/perfetto/trace/android:zero",
"../../protos/perfetto/trace/ftrace:cpp",
"../../protos/perfetto/trace/ftrace:zero",
"../../protos/perfetto/trace/ps:cpp",
"../../protos/perfetto/trace/ps:zero",
"../base:test_support",
"../trace_processor/util:util",
]
}