| # 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 = [ |
| ":affine-fuzzers-pkg", |
| ":affine-test-pkg", |
| ] |
| } |
| |
| test("affine") { |
| output_name = "affine-test" |
| if (is_fuchsia) { |
| fdio_config = [ "//build/config/fuchsia:fdio_config" ] |
| if (configs + fdio_config - fdio_config != configs) { |
| configs -= fdio_config |
| } |
| } |
| sources = [ |
| "ratio.cc", |
| "transform.cc", |
| "utils.cc", |
| ] |
| deps = [ |
| "//sdk/lib/fdio", |
| "//sdk/lib/fit", |
| "//zircon/system/ulib/affine", |
| "//zircon/system/ulib/zxtest", |
| ] |
| } |
| |
| fuchsia_unittest_package("affine-test-pkg") { |
| deps = [ ":affine" ] |
| } |
| |
| fuchsia_library_fuzzer("affine-fuzzer") { |
| sources = [ "affine-fuzzer.cc" ] |
| deps = [ "//zircon/system/ulib/affine" ] |
| } |
| |
| fuchsia_fuzzer_component("affine-fuzzer-component") { |
| manifest = "meta/affine-fuzzer.cml" |
| deps = [ ":affine-fuzzer" ] |
| } |
| |
| fuchsia_fuzzer_package("affine-fuzzers-pkg") { |
| cpp_fuzzer_components = [ ":affine-fuzzer-component" ] |
| } |