| # 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/fuzzing/fuzzer.gni") |
| import("//build/test.gni") |
| import("//src/sys/build/components.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":bootfs-parser-fuzzer", |
| ":bootfs-test", |
| ] |
| } |
| |
| source_set("bootfs") { |
| sources = [ |
| "parser.cc", |
| "parser.h", |
| ] |
| public_deps = [ |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| |
| test("bootfs_test") { |
| sources = [ "parser-test.cc" ] |
| deps = [ |
| ":bootfs", |
| "//sdk/lib/fdio", |
| "//zircon/public/lib/zxtest", |
| ] |
| } |
| |
| fuchsia_unittest_package("bootfs-test") { |
| executable_path = "test/bootfs_test" |
| deps = [ ":bootfs_test" ] |
| } |
| |
| fuzzer("bootfs_parser_fuzzer") { |
| sources = [ "parser-fuzzer.cc" ] |
| deps = [ ":bootfs" ] |
| } |
| |
| fuzzers_package("bootfs-parser-fuzzer") { |
| cpp_fuzzers = [ ":bootfs_parser_fuzzer" ] |
| } |