| # Copyright 2020 The Fuchsia Authors |
| # |
| # Use of this source code is governed by a MIT-style |
| # license that can be found in the LICENSE file or at |
| # https://opensource.org/licenses/MIT |
| |
| import("//build/components.gni") |
| import("//build/test.gni") |
| |
| if (is_kernel) { |
| # NOTE: This cannot be called 'tests' due to the target with the same name |
| # below that is used in the Fuchsia build to add boot-option-test-package. |
| source_set("kernel-tests") { |
| # TODO(fxbug.dev/67010): testonly = true |
| sources = [ "kernel-tests.cc" ] |
| |
| deps = [ |
| "//zircon/kernel/lib/boot-options", |
| "//zircon/kernel/lib/ktl", |
| "//zircon/kernel/lib/unittest", |
| "//zircon/system/ulib/fbl", |
| ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":boot-option-test-package", |
| ":boot-option-tests($host_toolchain)", |
| ] |
| } |
| |
| test("boot-option-tests") { |
| sources = [ "user-tests.cc" ] |
| deps = [ |
| "//sdk/lib/fit", |
| "//zircon/kernel/lib/boot-options", |
| "//zircon/public/lib/zxtest", |
| ] |
| } |
| |
| fuchsia_component("boot-option-test-component") { |
| testonly = true |
| deps = [ ":boot-option-tests" ] |
| manifest = "meta/boot-option-tests.cmx" |
| } |
| |
| fuchsia_test_package("boot-option-test-package") { |
| package_name = "boot-option-tests" |
| test_components = [ ":boot-option-test-component" ] |
| } |