mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 00:06:09 +03:00
142 lines
3.6 KiB
Plaintext
142 lines
3.6 KiB
Plaintext
# Copyright 2014 The Chromium Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import("//testing/test.gni")
|
|
import("//third_party/protobuf/proto_library.gni")
|
|
|
|
component("tracing") {
|
|
sources = [
|
|
"child/child_trace_message_filter.cc",
|
|
"child/child_trace_message_filter.h",
|
|
"common/graphics_memory_dump_provider_android.cc",
|
|
"common/graphics_memory_dump_provider_android.h",
|
|
"common/tracing_messages.cc",
|
|
"common/tracing_messages.h",
|
|
"core/proto_utils.cc",
|
|
"core/proto_utils.h",
|
|
"core/proto_zero_message.cc",
|
|
"core/proto_zero_message.h",
|
|
"core/proto_zero_message_handle.cc",
|
|
"core/proto_zero_message_handle.h",
|
|
"core/scattered_stream_writer.cc",
|
|
"core/scattered_stream_writer.h",
|
|
"core/trace_buffer_writer.cc",
|
|
"core/trace_buffer_writer.h",
|
|
"core/trace_ring_buffer.cc",
|
|
"core/trace_ring_buffer.h",
|
|
"tracing_export.h",
|
|
]
|
|
|
|
defines = [ "TRACING_IMPLEMENTATION" ]
|
|
|
|
deps = [
|
|
"//base",
|
|
"//ipc",
|
|
]
|
|
|
|
public_deps = [
|
|
"//components/tracing/proto:protos",
|
|
]
|
|
}
|
|
|
|
component("startup_tracing") {
|
|
sources = [
|
|
"common/trace_config_file.cc",
|
|
"common/trace_config_file.h",
|
|
"common/trace_startup.cc",
|
|
"common/trace_startup.h",
|
|
"common/trace_to_console.cc",
|
|
"common/trace_to_console.h",
|
|
"common/tracing_switches.cc",
|
|
"common/tracing_switches.h",
|
|
"tracing_export.h",
|
|
]
|
|
|
|
defines = [ "TRACING_IMPLEMENTATION" ]
|
|
|
|
deps = [
|
|
"//base",
|
|
]
|
|
}
|
|
|
|
# For unit testing of generated stubs.
|
|
proto_library("proto_zero_testing_messages") {
|
|
visibility = [ "//components/tracing/*" ]
|
|
|
|
sources = [
|
|
"test/example_proto/library.proto",
|
|
"test/example_proto/library_internals/galaxies.proto",
|
|
"test/example_proto/test_messages.proto",
|
|
"test/example_proto/upper_import.proto",
|
|
]
|
|
|
|
proto_in_dir = "test/example_proto"
|
|
|
|
generator_plugin_label = "tools/proto_zero_plugin:proto_zero_plugin"
|
|
generator_plugin_suffix = ".pbzero"
|
|
generator_plugin_options = "wrapper_namespace=pbzero"
|
|
generate_cc = true
|
|
generate_python = false
|
|
}
|
|
|
|
source_set("unit_tests") {
|
|
testonly = true
|
|
|
|
sources = [
|
|
"child/child_trace_message_filter_unittest.cc",
|
|
"common/graphics_memory_dump_provider_android_unittest.cc",
|
|
"core/proto_utils_unittest.cc",
|
|
"core/proto_zero_message_unittest.cc",
|
|
"core/scattered_stream_writer_unittest.cc",
|
|
"core/trace_buffer_writer_unittest.cc",
|
|
"core/trace_ring_buffer_unittest.cc",
|
|
"test/fake_scattered_buffer.cc",
|
|
"test/fake_scattered_buffer.h",
|
|
"test/proto_zero_generation_unittest.cc",
|
|
]
|
|
|
|
deps = [
|
|
":proto_zero_testing_messages",
|
|
":tracing",
|
|
"//base/test:test_support",
|
|
"//components/tracing/proto:golden_protos_for_tests",
|
|
"//ipc",
|
|
"//testing/gmock:gmock",
|
|
"//testing/gtest",
|
|
]
|
|
|
|
if (!is_android) {
|
|
sources += [ "common/trace_config_file_unittest.cc" ]
|
|
deps += [ ":startup_tracing" ]
|
|
}
|
|
}
|
|
|
|
test("tracing_perftests") {
|
|
sources = [
|
|
"test/heap_profiler_perftest.cc",
|
|
"test/perf_test_helpers.cc",
|
|
"test/perf_test_helpers.h",
|
|
"test/trace_event_perftest.cc",
|
|
]
|
|
deps = [
|
|
"//base:base",
|
|
"//base/test:test_support",
|
|
"//base/test:test_support_perf",
|
|
"//testing/gtest",
|
|
"//testing/perf",
|
|
]
|
|
|
|
data = [
|
|
# Needed for isolate script to execute.
|
|
"//testing/scripts/common.py",
|
|
"//testing/xvfb.py",
|
|
"//testing/scripts/run_gtest_perf_test.py",
|
|
"//tools/perf/generate_legacy_perf_dashboard_json.py",
|
|
]
|
|
|
|
if (is_android) {
|
|
deps += [ "//testing/android/native_test:native_test_native_code" ]
|
|
}
|
|
}
|