| # 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/package.gni") |
| import("//build/test/test_package.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/public/lib/zx", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/cmdline", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| executable("bin") { |
| output_name = "sched" |
| |
| sources = [ "main.cc" ] |
| |
| deps = [ ":lib" ] |
| } |
| |
| package("sched") { |
| deps = [ ":bin" ] |
| |
| binaries = [ |
| { |
| shell = true |
| name = "sched" |
| }, |
| ] |
| } |
| |
| 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/public/lib/zx", |
| ] |
| } |
| |
| test_package("sched_tests") { |
| deps = [ ":bin_test" ] |
| |
| tests = [ |
| { |
| shell = true |
| name = "sched_tests" |
| dest = "sched_tests" |
| environments = basic_envs |
| }, |
| ] |
| } |