| # 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/test.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":zbi($host_toolchain)", |
| ":zbi-test-pkg", |
| ] |
| } |
| |
| test("zbi") { |
| if (is_fuchsia) { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| } |
| output_name = "libzbi-test" |
| sources = [ "zbi.cc" ] |
| deps = [ |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/pretty", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/zbi", |
| ] |
| if (is_fuchsia) { |
| deps += [ |
| "//sdk/lib/fdio", |
| "//zircon/public/lib/zx", |
| ] |
| } else { |
| output_dir = "$root_out_dir/zircon-migrated" |
| } |
| } |
| |
| fuchsia_unittest_package("zbi-test-pkg") { |
| package_name = "libzbi-test" |
| deps = [ ":zbi" ] |
| } |