| # 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/fuzzing/fuzzer.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| import("//third_party/protobuf/proto_library.gni") |
| |
| group("bin") { |
| testonly = true |
| deps = [ |
| ":cobalt_tests", |
| "app", |
| "system-metrics", |
| "testapp", |
| "testing", |
| "utils", |
| ] |
| } |
| |
| test_package("cobalt_tests") { |
| deps = [ |
| "app:app", |
| "app:cobalt_app_unittests", |
| "app:global_metrics_registry", |
| "app:testapp_metrics_registry", |
| "system-metrics:cobalt_system_metrics_unittests", |
| "testapp:cobalt_fake_timekeeper", |
| "testapp:cobalt_testapp", |
| "utils:cobalt_utils_unittests", |
| ] |
| |
| binaries = [ |
| { |
| name = "cobalt_testapp" |
| }, |
| ] |
| |
| tests = [ |
| { |
| name = "cobalt_app_unittests" |
| environments = basic_envs |
| }, |
| |
| { |
| name = "cobalt_system_metrics_unittests" |
| environments = basic_envs |
| }, |
| |
| { |
| name = "cobalt_utils_unittests" |
| environments = basic_envs |
| }, |
| |
| { |
| name = "cobalt_testapp" |
| dest = "cobalt_testapp_no_network" |
| environments = basic_envs |
| }, |
| |
| { |
| name = "cobalt_testapp" |
| dest = "cobalt_testapp_no_environment" |
| |
| # We don't want to run this version of cobalt_testapp in |
| # CI/CQ because it uses the real network. We run cobalt_testapp_no_network |
| # instead. |
| disabled = true |
| }, |
| ] |
| |
| resources = [ |
| { |
| # Cobalt 1.0 analyzer public key for devel environment. |
| path = rebase_path("//third_party/cobalt/keys/analyzer_public.cobalt_key") |
| dest = "keys/analyzer_devel_public" |
| }, |
| { |
| # Cobalt 1.0 shuffler public key for devel environment. |
| path = rebase_path("//third_party/cobalt/keys/shuffler_public.cobalt_key") |
| dest = "keys/shuffler_devel_public" |
| }, |
| { |
| path = rebase_path( |
| get_label_info("app:testapp_metrics_registry", "target_gen_dir") + |
| "/testapp_metrics_registry.pb") |
| dest = "testapp_metrics_registry.pb" |
| }, |
| ] |
| } |
| |
| test_package("cobalt_tests_do_not_run_manually") { |
| deps = [ "testapp:cobalt_testapp" ] |
| |
| binaries = [ |
| # Referred to by cobalt_testapp_for_prober_do_not_run_manually.cmx |
| { |
| name = "cobalt_testapp" |
| }, |
| ] |
| |
| tests = [ |
| { |
| name = |
| rebase_path("meta/cobalt_testapp_for_prober_do_not_run_manually.cmx") |
| dest = "cobalt_testapp_for_prober_do_not_run_manually" |
| |
| # We don't want to run this version of cobalt_testapp in the Garnet |
| # CI/CQ because it uses the real network. We run cobalt_testapp_no_network |
| # instead. This version is run in the stand-alone cobalt_client CI. |
| # It should not be run outside of CI, since it populates a test pipeline |
| # whose output is inspected. |
| environments = [ |
| { |
| dimensions = { |
| # The test doesn't care about what device it runs on, but it needs |
| # internet acess. As of writing, this is the only device type that |
| # has that. |
| device_type = "Intel NUC Kit NUC7i5DNHE" |
| } |
| tags = [ "cobalt-prober" ] |
| }, |
| ] |
| }, |
| ] |
| } |
| |
| fuzzers_package("cobalt_fuzzers") { |
| fuzzers = [ |
| "app/fuzzer:logger_factory_fuzzer", |
| "app/fuzzer:logger_fuzzer", |
| "app/fuzzer:system_data_updater_fuzzer", |
| ] |
| } |