| # 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") |
| import("//build/fuzz.gni") |
| import("//build/test.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":tftp-fuzzers", |
| ":tftp-test-pkg", |
| ] |
| } |
| |
| test("tftp-test") { |
| if (is_fuchsia) { |
| fdio_config = [ "//build/config/fuchsia:fdio_config" ] |
| if (configs + fdio_config - fdio_config != configs) { |
| configs -= fdio_config |
| } |
| } |
| output_name = "tftp-test" |
| sources = [ |
| "tftp-file-test.cc", |
| "tftp-test.cc", |
| ] |
| deps = [ |
| "//sdk/lib/fdio", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/tftp", |
| "//zircon/system/ulib/zxtest", |
| ] |
| include_dirs = [ ".." ] |
| } |
| |
| fuchsia_library_fuzzer("tftp-fuzzer") { |
| sources = [ "tftp-fuzztest.cc" ] |
| deps = [ |
| "//sdk/lib/fdio", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/tftp", |
| ] |
| include_dirs = [ ".." ] |
| } |
| |
| fuchsia_fuzzer_component("tftp-fuzzer-component") { |
| manifest = "meta/tftp-fuzzer.cml" |
| deps = [ ":tftp-fuzzer" ] |
| } |
| |
| fuchsia_fuzzer_package("tftp-fuzzers") { |
| cpp_fuzzer_components = [ ":tftp-fuzzer-component" ] |
| } |
| |
| fuchsia_unittest_package("tftp-test-pkg") { |
| package_name = "tftp-test" |
| deps = [ ":tftp-test" ] |
| } |