| # 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. |
| |
| ########################################## |
| # Though under //zircon, this build file # |
| # is meant to be used in the Fuchsia GN # |
| # build. # |
| # See fxbug.dev/36139. # |
| ########################################## |
| |
| assert(!defined(zx) || zx != "/", |
| "This file can only be used in the Fuchsia GN build.") |
| |
| import("//build/test.gni") |
| import("//src/sys/build/fuchsia_unittest_package.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":zxio-unittest-package" ] |
| } |
| |
| test("zxio") { |
| output_name = "zxio-test" |
| sources = [ |
| "c-compilation-test.c", |
| "debuglog-test.cc", |
| "dir_v2-test.cc", |
| "dirent-test.cc", |
| "extensions-test.cc", |
| "file-test.cc", |
| "file_test_suite.cc", |
| "file_test_suite.h", |
| "file_v2-test.cc", |
| "null-test.cc", |
| "posix-mode-test.cc", |
| "remote-test.cc", |
| "remote_v2-test.cc", |
| "rights-const-test.cc", |
| "vmo-test.cc", |
| "vmofile-test.cc", |
| "zxio-test.cc", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_c", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_llcpp", |
| "//sdk/fidl/fuchsia.io2:fuchsia.io2_llcpp", |
| "//sdk/lib/fdio", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/async-default", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/fidl-async:fidl-async-cpp", |
| "//zircon/system/ulib/zxio", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| fuchsia_unittest_package("zxio-unittest-package") { |
| manifest = "meta/zxio_test.cmx" |
| deps = [ ":zxio" ] |
| } |