| # Copyright 2020 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. |
| |
| ########################################## |
| # Though under //zircon, this build file # |
| # is meant to be used in the Fuchsia GN # |
| # build. # |
| # See fxb/36139. # |
| ########################################## |
| |
| import("//build/test.gni") |
| import("//build/test/test_package.gni") |
| |
| assert(!defined(zx) || zx != "/", |
| "This file can only be used in the Fuchsia GN build.") |
| |
| group("test") { |
| testonly = true |
| deps = [ |
| ":zbitl-test-package", |
| ":zbitl-unittests", |
| ] |
| } |
| |
| test("zbitl-unittests") { |
| sources = [ |
| "checking-tests.cc", |
| "fd-tests.cc", |
| "json-tests.cc", |
| "stdio-tests.cc", |
| "view-tests.cc", |
| ] |
| deps = [ |
| "//src/lib/files", |
| "//src/lib/fxl", |
| "//zircon/public/lib/zbitl", |
| "//zircon/public/lib/zxtest", |
| |
| # TODO(57392): Move it back to //third_party once unification completes. |
| "//zircon/third_party/rapidjson", |
| ] |
| if (is_fuchsia) { |
| sources += [ "vmo-tests.cc" ] |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| } |
| } |
| |
| test_package("zbitl-test-package") { |
| package_name = "zbitl-tests" |
| deps = [ ":zbitl-unittests" ] |
| |
| tests = [ |
| { |
| name = "zbitl-unittests" |
| }, |
| ] |
| } |