| # 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("$zx/public/gn/resource.gni") |
| |
| test("runtests-utils") { |
| sources = [ |
| "runtests-utils-test-utils.cpp", |
| "runtests-utils-test.cpp", |
| ] |
| deps = [ |
| "$zx/system/ulib/fbl", |
| "$zx/system/ulib/runtests-utils", |
| "$zx/system/ulib/unittest", |
| ] |
| if (is_fuchsia) { |
| sources += [ |
| "fuchsia-run-test.cpp", |
| "fuchsia-test-main.cpp", |
| "log-exporter-test.cpp", |
| ] |
| deps += [ "$zx/system/ulib/memfs" ] |
| data_deps = [ |
| ":publish-data-helper", |
| ":test-data", |
| ] |
| } else { |
| sources += [ "posix-test-main.cpp" ] |
| } |
| } |
| |
| if (is_fuchsia) { |
| executable("publish-data-helper") { |
| testonly = true |
| visibility = [ ":*" ] |
| sources = [ |
| "helper/publish-data-helper.c", |
| ] |
| deps = [ |
| "$zx/system/ulib/fdio", |
| "$zx/system/ulib/unittest", |
| "$zx/system/ulib/zircon", |
| ] |
| |
| # TODO: Don't instrument the helper until we have a way to route sinks |
| # from the inner runtests instance to the outer one so they make it |
| # into summary.json. |
| } |
| |
| generated_resource("test-data") { |
| testonly = true |
| contents = [ "Hello world!" ] |
| outputs = [ |
| "testdata/runtests-utils/test-data", |
| ] |
| } |
| } |
| |