| # Copyright 2016 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/package.gni") |
| import("//build/fidl/fidl.gni") |
| |
| # This executable runs the benchmarks via the gbenchmark library. It is |
| # not suitable for running via runtests because, by default (when run with |
| # no arguments), it is too slow. |
| executable("bin") { |
| output_name = "zircon_benchmarks" |
| testonly = true |
| sources = [ |
| "main_gbenchmark.cc", |
| ] |
| deps = [ |
| ":lib", |
| ] |
| } |
| |
| # This executable runs the benchmarks quickly. It is included in |
| # /system/test/ and so gets run on the bots via runtests. Its role is |
| # to ensure that the benchmarks are kept working. It bypasses use of |
| # the gbenchmark library. |
| executable("test") { |
| output_name = "zircon_benchmarks_test" |
| testonly = true |
| sources = [ |
| "main_test.cc", |
| ] |
| deps = [ |
| ":lib", |
| ] |
| } |
| |
| source_set("lib") { |
| testonly = true |
| sources = [ |
| "channels.cc", |
| "events.cc", |
| "filesystem.cc", |
| "mmu.cc", |
| "null.cc", |
| "ports.cc", |
| "pthreads.cc", |
| "round_trips.cc", |
| "sockets.cc", |
| "test_runner.cc", |
| "threads.cc", |
| "vmo.cc", |
| ] |
| deps = [ |
| "//garnet/public/lib/fsl", |
| "//garnet/public/lib/fxl", |
| "//third_party/gflags", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fdio", |
| "//zircon/public/lib/zx", |
| ":fidl_interface", |
| ] |
| public_deps = [ |
| "//third_party/benchmark", |
| "//zircon/public/lib/perftest", |
| ] |
| libs = [ |
| "zircon", |
| ] |
| } |
| |
| fidl("fidl_interface") { |
| testonly = true |
| name = "fuchsia.zircon.benchmarks" |
| sources = [ |
| "round_trip_service.fidl", |
| ] |
| } |
| |
| package("zircon_benchmarks") { |
| testonly = true |
| |
| deps = [ |
| ":bin", |
| ":test", |
| ] |
| |
| binary = "zircon_benchmarks" |
| |
| tests = [ |
| { |
| name = "zircon_benchmarks_test" |
| }, |
| ] |
| } |