blob: f6c50d66d6335e7c3d576b939df24de80a18d170 [file] [log] [blame]
# 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/cpp/cpp_fuzzer.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",
]
}
} else {
group("tests") {
testonly = true
deps = [
":boot-options-fuzzers",
":boot-options-tests",
":boot-options-unittests($host_toolchain)",
]
}
test("boot-options-unittests") {
sources = [ "user-tests.cc" ]
deps = [
"//sdk/lib/fit",
"//zircon/kernel/lib/boot-options",
"//zircon/system/ulib/zxtest",
]
}
fuchsia_unittest_package("boot-options-tests") {
deps = [ ":boot-options-unittests" ]
manifest = "meta/boot-options-tests.cml"
}
fuzzer_package("boot-options-fuzzers") {
fuzz_host = true
cpp_fuzzers = [ ":boot-options-basic-fuzzer" ]
}
cpp_fuzzer("boot-options-basic-fuzzer") {
sources = [ "fuzzer.cc" ]
deps = [ "//zircon/kernel/lib/boot-options" ]
dictionary = "fuzzer-dictionary.txt"
}
}