BUILD.gn 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Copyright 2019 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("//build/config/chromeos/ui_mode.gni")
  5. if (is_chromeos_ash) {
  6. # Used to build and run fuzzer in ash-only code.
  7. import("//testing/libfuzzer/fuzzer_test.gni")
  8. }
  9. assert(is_chromeos,
  10. "Non-Chrome-OS or Lacros builds must not depend on //chromeos")
  11. component("system") {
  12. output_name = "chromeos_system"
  13. defines = [ "IS_CHROMEOS_SYSTEM_IMPL" ]
  14. deps = [ "//base" ]
  15. sources = [
  16. "cpu_temperature_reader.cc",
  17. "cpu_temperature_reader.h",
  18. ]
  19. if (is_chromeos) {
  20. deps += [ "//chromeos:chromeos_export" ]
  21. sources += [
  22. "core_scheduling.cc",
  23. "core_scheduling.h",
  24. ]
  25. }
  26. if (is_chromeos_ash) {
  27. deps += [
  28. "//ash/constants",
  29. "//base",
  30. "//ui/ozone:ozone_base",
  31. ]
  32. sources += [
  33. "devicemode.cc",
  34. "devicemode.h",
  35. "factory_ping_embargo_check.cc",
  36. "factory_ping_embargo_check.h",
  37. "kiosk_oem_manifest_parser.cc",
  38. "kiosk_oem_manifest_parser.h",
  39. # Used when running mash, both on Linux and on real devices.
  40. "fake_statistics_provider.cc",
  41. "fake_statistics_provider.h",
  42. "name_value_pairs_parser.cc",
  43. "name_value_pairs_parser.h",
  44. "scheduler_configuration_manager_base.cc",
  45. "scheduler_configuration_manager_base.h",
  46. "statistics_provider.cc",
  47. "statistics_provider.h",
  48. ]
  49. }
  50. }
  51. source_set("unit_tests") {
  52. testonly = true
  53. deps = [
  54. ":system",
  55. "//base",
  56. "//testing/gtest",
  57. ]
  58. sources = [ "cpu_temperature_reader_unittest.cc" ]
  59. if (is_chromeos_ash) {
  60. deps += [
  61. "//base/test:test_support",
  62. "//chromeos:test_utils",
  63. ]
  64. sources += [
  65. "factory_ping_embargo_check_unittest.cc",
  66. "kiosk_oem_manifest_parser_unittest.cc",
  67. "name_value_pairs_parser_unittest.cc",
  68. ]
  69. }
  70. }
  71. if (is_chromeos_ash) {
  72. fuzzer_test("name_value_pairs_parser_fuzzer") {
  73. sources = [ "name_value_pairs_parser_fuzzer.cc" ]
  74. deps = [ ":system" ]
  75. }
  76. }