BUILD.gn 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. # Copyright 2014 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//testing/test.gni")
  5. if (is_android) {
  6. component("graphics_provider") {
  7. sources = [
  8. "common/graphics_memory_dump_provider_android.cc",
  9. "common/graphics_memory_dump_provider_android.h",
  10. "tracing_export.h",
  11. ]
  12. defines = [ "TRACING_IMPLEMENTATION" ]
  13. deps = [ "//base" ]
  14. }
  15. }
  16. component("startup_tracing") {
  17. sources = [
  18. "common/trace_startup_config.cc",
  19. "common/trace_startup_config.h",
  20. "common/trace_to_console.cc",
  21. "common/trace_to_console.h",
  22. "common/tracing_switches.cc",
  23. "common/tracing_switches.h",
  24. "tracing_export.h",
  25. ]
  26. defines = [ "TRACING_IMPLEMENTATION" ]
  27. deps = [ "//base" ]
  28. }
  29. component("background_tracing_metrics_provider") {
  30. sources = [
  31. "common/background_tracing_metrics_provider.cc",
  32. "common/background_tracing_metrics_provider.h",
  33. "tracing_export.h",
  34. ]
  35. defines = [ "TRACING_IMPLEMENTATION" ]
  36. deps = [
  37. "//base",
  38. "//components/metrics:content",
  39. "//content/public/browser",
  40. ]
  41. }
  42. component("background_tracing_utils") {
  43. sources = [
  44. "common/background_tracing_state_manager.cc",
  45. "common/background_tracing_state_manager.h",
  46. "common/background_tracing_utils.cc",
  47. "common/background_tracing_utils.h",
  48. "common/pref_names.cc",
  49. "common/pref_names.h",
  50. ]
  51. defines = [ "IS_BACKGROUND_TRACING_UTILS_IMPL" ]
  52. deps = [
  53. ":startup_tracing",
  54. "//base",
  55. "//components/prefs",
  56. "//content/public/browser",
  57. ]
  58. }
  59. source_set("unit_tests") {
  60. testonly = true
  61. deps = [
  62. "//base/test:test_support",
  63. "//testing/gmock:gmock",
  64. "//testing/gtest",
  65. ]
  66. if (is_android) {
  67. sources = [ "common/graphics_memory_dump_provider_android_unittest.cc" ]
  68. deps += [ ":graphics_provider" ]
  69. }
  70. if (!is_android) {
  71. sources = [ "common/trace_startup_config_unittest.cc" ]
  72. deps += [ ":startup_tracing" ]
  73. }
  74. sources += [
  75. "common/background_tracing_state_manager_unittest.cc",
  76. "common/background_tracing_utils_unittest.cc",
  77. ]
  78. deps += [
  79. ":background_tracing_utils",
  80. ":startup_tracing",
  81. "//components/metrics:metrics",
  82. "//components/prefs:test_support",
  83. "//content/public/browser",
  84. "//content/test:test_support",
  85. ]
  86. }
  87. test("tracing_perftests") {
  88. sources = [
  89. "test/perf_test_helpers.cc",
  90. "test/perf_test_helpers.h",
  91. "test/trace_event_perftest.cc",
  92. ]
  93. deps = [
  94. "//base:base",
  95. "//base/test:test_support",
  96. "//base/test:test_support_perf",
  97. "//testing/gtest",
  98. "//testing/perf",
  99. ]
  100. data_deps = [
  101. # Needed for isolate script to execute.
  102. "//testing:run_perf_test",
  103. ]
  104. if (is_android) {
  105. deps += [ "//testing/android/native_test:native_test_native_code" ]
  106. }
  107. }