| # Copyright 2017 The Fuchsia 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("//build/package.gni") |
| import("//third_party/cobalt/metrics_registry.gni") |
| |
| group("testapp") { |
| testonly = true |
| deps = [ |
| ":cobalt_fake_timekeeper", |
| ":cobalt_testapp", |
| ":prober_metrics_registry", |
| ":testapp_metrics_registry", |
| ] |
| } |
| |
| metrics_registry("testapp_metrics_registry") { |
| # This must match the ID of our Cobalt project as specified in: |
| # third_party/cobalt_config/projects.yaml |
| project_id = 657579885 |
| namespace = "cobalt_registry" |
| for_testing = true |
| generate_cc = true |
| generate_binarypb = false |
| } |
| |
| metrics_registry("prober_metrics_registry") { |
| # This must match the ID of our Cobalt project as specified in: |
| # third_party/cobalt_config/projects.yaml |
| project_id = 929352809 |
| namespace = "cobalt_prober_registry" |
| for_testing = true |
| generate_cc = true |
| generate_binarypb = false |
| } |
| |
| executable("cobalt_testapp") { |
| output_name = "cobalt_testapp" |
| sources = [ |
| "cobalt_testapp.cc", |
| "cobalt_testapp.h", |
| "cobalt_testapp_logger.cc", |
| "cobalt_testapp_logger.h", |
| "cobalt_testapp_main.cc", |
| "tests.cc", |
| "tests.h", |
| ] |
| |
| deps = [ |
| ":prober_metrics_registry_cc", |
| ":testapp_metrics_registry_cc", |
| "//garnet/public/lib/svc/cpp", |
| "//sdk/lib/sys/cpp", |
| "//src/cobalt/bin/utils:base64", |
| "//src/lib/cobalt/cpp:cobalt_event_builder", |
| "//src/lib/fsl", |
| "//src/lib/fxl", |
| "//src/lib/syslog/cpp", |
| "//src/sys/timekeeper:fuchsia.time", |
| "//third_party/cobalt/src/lib/util:clock", |
| "//third_party/cobalt/src/lib/util:datetime_util", |
| "//third_party/cobalt/src/registry:cobalt_registry_proto", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/async-loop-default", |
| "//zircon/system/fidl/fuchsia-cobalt", |
| ] |
| |
| configs += [ "//third_party/cobalt:cobalt_config" ] |
| } |
| |
| source_set("fake_timekeeper_lib") { |
| sources = [ "fake_timekeeper.h" ] |
| |
| public_deps = [ |
| "//sdk/lib/sys/cpp", |
| "//src/lib/syslog/cpp", |
| "//src/sys/timekeeper:fuchsia.time", |
| ] |
| } |
| |
| executable("fake_timekeeper") { |
| output_name = "fake_timekeeper" |
| sources = [ "fake_timekeeper_main.cc" ] |
| |
| deps = [ |
| ":fake_timekeeper_lib", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fsl", |
| "//src/lib/fxl", |
| "//src/lib/syslog/cpp", |
| "//src/sys/timekeeper:fuchsia.time", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/async-loop-default", |
| ] |
| } |
| |
| package("cobalt_fake_timekeeper") { |
| deps = [ ":fake_timekeeper" ] |
| |
| binaries = [ |
| { |
| name = "fake_timekeeper" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/timekeeper.cmx") |
| dest = "cobalt_fake_timekeeper.cmx" |
| }, |
| ] |
| } |