summaryrefslogtreecommitdiff
path: root/chromium/chromecast/crash/BUILD.gn
blob: bb261ce8f0bca2eb3ddef9cb32b6d4a2271a71a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Copyright 2015 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("//chromecast/chromecast.gni")
import("//testing/test.gni")

source_set("crash") {
  sources = [
    "app_state_tracker.cc",
    "app_state_tracker.h",
    "cast_crash_keys.cc",
    "cast_crash_keys.h",
    "cast_crashdump_uploader.cc",
    "cast_crashdump_uploader.h",
    "linux/crash_util.cc",
    "linux/crash_util.h",
    "linux/dummy_minidump_generator.cc",
    "linux/dummy_minidump_generator.h",
    "linux/dump_info.cc",
    "linux/dump_info.h",
    "linux/minidump_generator.h",
    "linux/minidump_params.cc",
    "linux/minidump_params.h",
    "linux/minidump_uploader.cc",
    "linux/minidump_uploader.h",
    "linux/minidump_writer.cc",
    "linux/minidump_writer.h",
    "linux/synchronized_minidump_manager.cc",
    "linux/synchronized_minidump_manager.h",
  ]

  deps = [
    "//base",
    "//breakpad:client",
    "//chromecast/base",
    "//chromecast/base:cast_version",
    "//components/metrics",
    "//components/prefs",
  ]

  if (chromecast_branding == "public") {
    deps += [ "//chromecast/base:cast_sys_info" ]
  } else {
    deps += [ "//chromecast/base:cast_sys_info_shlib" ]
  }
}

executable("crash_uploader") {
  sources = [
    "linux/crash_uploader.cc",
  ]

  deps = [
    ":crash",
    "//base",
    "//chromecast/base",
    "//chromecast/base:cast_sys_info",
    "//chromecast/public",
    "//chromecast/system/reboot:reboot_util",
  ]

  if (chromecast_branding != "public") {
    deps += [ "//chromecast/base:cast_sys_info_shlib" ]
  }
}

source_set("test_support") {
  sources = [
    "linux/crash_testing_utils.cc",
    "linux/crash_testing_utils.h",
  ]

  deps = [
    ":crash",
    "//base",
    "//chromecast/base",
  ]
}

if (is_linux) {
  test("cast_crash_unittests") {
    sources = [
      "cast_crashdump_uploader_unittest.cc",
      "linux/dummy_minidump_generator_unittest.cc",
      "linux/dump_info_unittest.cc",
      "linux/minidump_uploader_unittest.cc",
      "linux/minidump_writer_unittest.cc",
      "linux/synchronized_minidump_manager_unittest.cc",
    ]

    deps = [
      ":crash",
      ":test_support",
      "//base",
      "//base/test:run_all_unittests",
      "//base/test:test_support",
      "//breakpad:client",
      "//chromecast/base:cast_sys_info",
      "//chromecast/base:test_support",
      "//components/metrics",
      "//components/prefs:test_support",
      "//testing/gmock",
      "//testing/gtest",
    ]
  }
}