| # Copyright 2019 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/components.gni") |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":sched_tests" ] |
| } |
| |
| source_set("lib") { |
| sources = [ |
| "args.cc", |
| "sched.cc", |
| ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.scheduler", |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/lib/fdio", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fxl", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/cmdline", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| executable("bin") { |
| output_name = "sched" |
| |
| sources = [ "main.cc" ] |
| |
| deps = [ ":lib" ] |
| } |
| |
| fuchsia_shell_package("sched") { |
| deps = [ ":bin" ] |
| } |
| |
| executable("bin_test") { |
| testonly = true |
| |
| output_name = "sched_tests" |
| |
| sources = [ "sched_test.cc" ] |
| |
| deps = [ |
| ":lib", |
| "//src/lib/files", |
| "//src/lib/fxl", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gmock", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| fuchsia_test_component("sched_tests_component") { |
| manifest = "meta/sched_tests.cmx" |
| deps = [ ":bin_test" ] |
| } |
| |
| fuchsia_test_package("sched_tests") { |
| test_components = [ ":sched_tests_component" ] |
| } |