blob: 08abf3c3cec0ef90c73f0fd63efb345d708c2cdf [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 = [
"build_timeline.cc",
"build_timeline.h",
"filter_ftrace_using_allowlist.cc",
"filter_ftrace_using_allowlist.h",
"filter_packet_using_allowlist.cc",
"filter_packet_using_allowlist.h",
"filter_print_events.cc",
"filter_print_events.h",
"filter_sched_waking_events.cc",
"filter_sched_waking_events.h",
"filter_task_rename.cc",
"filter_task_rename.h",
"find_package_uid.cc",
"find_package_uid.h",
"optimize_timeline.cc",
"optimize_timeline.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_event.cc",
"redact_ftrace_event.h",
"redact_process_free.cc",
"redact_process_free.h",
"redact_sched_switch.cc",
"redact_sched_switch.h",
"redact_task_newtask.cc",
"redact_task_newtask.h",
"scrub_ftrace_events.cc",
"scrub_ftrace_events.h",
"scrub_process_stats.cc",
"scrub_process_stats.h",
"scrub_process_trees.cc",
"scrub_process_trees.h",
"scrub_trace_packet.cc",
"scrub_trace_packet.h",
"trace_redaction_framework.cc",
"trace_redaction_framework.h",
"trace_redactor.cc",
"trace_redactor.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",
"redact_sched_switch_integrationtest.cc",
"scrub_ftrace_events_integrationtest.cc",
"scrub_process_stats_integrationtest.cc",
"scrub_process_trees_integrationtest.cc",
"trace_redaction_integration_fixture.cc",
"trace_redaction_integration_fixture.h",
"trace_redactor_integrationtest.cc",
]
deps = [
":trace_redaction",
"../../gn:default_deps",
"../../gn:gtest_and_gmock",
"../../include/perfetto/ext/base",
"../../protos/perfetto/trace:non_minimal_zero",
"../../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 = [
"build_timeline_unittest.cc",
"filter_ftrace_using_allowlist_unittest.cc",
"filter_packet_using_allowlist_unittest.cc",
"filter_sched_waking_events_unittest.cc",
"filter_task_rename_unittest.cc",
"find_package_uid_unittest.cc",
"process_thread_timeline_unittest.cc",
"proto_util_unittest.cc",
"prune_package_list_unittest.cc",
"redact_process_free_unittest.cc",
"redact_sched_switch_unittest.cc",
"redact_task_newtask_unittest.cc",
]
deps = [
":trace_redaction",
"../../gn:default_deps",
"../../gn:gtest_and_gmock",
"../../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/ftrace:cpp",
"../../protos/perfetto/trace/ftrace:zero",
"../../protos/perfetto/trace/ps:cpp",
"../../protos/perfetto/trace/ps:zero",
"../base:test_support",
]
}