summaryrefslogtreecommitdiffstats
path: root/tools/battor_agent/BUILD.gn
blob: 12fb7d5dbb0607a6b9ea31bc68997171e6b760b1 (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
# 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("//testing/test.gni")

# Works only on desktop platforms.
assert(is_win || is_linux || is_mac)

executable("battor_agent") {
  sources = [
    "battor_agent_bin.cc",
  ]
  deps = [
    ":battor_agent_lib",
    "//base",
    "//device/serial",
    "//mojo/public/c/system:for_shared_library",
  ]
}

source_set("battor_agent_lib") {
  sources = [
    "battor_agent.cc",
    "battor_agent.h",
    "battor_connection.cc",
    "battor_connection.h",
    "battor_connection_impl.cc",
    "battor_connection_impl.h",
    "battor_error.h",
    "battor_finder.cc",
    "battor_finder.h",
    "battor_sample_converter.cc",
    "battor_sample_converter.h",
  ]
  deps = [
    "//base",
    "//device/serial",
    "//net",
  ]
}

test("battor_agent_unittests") {
  sources = [
    "battor_agent_unittest.cc",
    "battor_connection_impl_unittest.cc",
    "battor_protocol_types_unittest.cc",
    "battor_sample_converter_unittest.cc",
  ]
  deps = [
    ":battor_agent_lib",
    "//base",
    "//base/test:run_all_unittests",
    "//base/test:test_support",
    "//device/serial",
    "//device/serial:test_support",
    "//mojo/public/c/system:for_shared_library",
    "//testing/gmock",
    "//testing/gtest",
  ]
}

# TODO(GYP): Delete this after we've converted everything to GN.
# The _run targets exist only for compatibility w/ GYP.
group("battor_agent_unittests_run") {
  testonly = true
  deps = [
    ":battor_agent_unittests",
  ]
}