blob: 1f088ea41df2a7dce735558d345c8c5252e9cda8 [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_sched_waking_events.cc",
"filter_sched_waking_events.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_sched_switch.cc",
"redact_sched_switch.h",
"scrub_ftrace_events.cc",
"scrub_ftrace_events.h",
"scrub_process_trees.cc",
"scrub_process_trees.h",
"scrub_task_rename.cc",
"scrub_task_rename.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",
]
}
source_set("integrationtests") {
testonly = true
sources = [
"filter_ftrace_using_allowlist_integrationtest.cc",
"filter_sched_waking_events_integrationtest.cc",
"redact_sched_switch_integrationtest.cc",
"scrub_ftrace_events_integrationtest.cc",
"scrub_process_trees_integrationtest.cc",
"scrub_task_rename_integrationtest.cc",
"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_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_sched_switch_unittest.cc",
"scrub_task_rename_unittest.cc",
"scrub_trace_packet_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",
]
}