| # Copyright 2018 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/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| group("components") { |
| testonly = true |
| |
| deps = [ |
| ":component_hello_world", |
| ":component_hello_world_tests", |
| ] |
| } |
| |
| executable("bin") { |
| output_name = "application" |
| |
| sources = [ "hello_world.cc" ] |
| |
| deps = [ "//zircon/public/lib/zx" ] |
| } |
| |
| executable("bin2") { |
| output_name = "application2" |
| |
| sources = [ "hello_world2.cc" ] |
| |
| deps = [ "//zircon/public/lib/zx" ] |
| } |
| |
| package("component_hello_world") { |
| deps = [ |
| ":bin", |
| ":bin2", |
| ] |
| |
| binaries = [ |
| { |
| name = "application" |
| }, |
| { |
| name = "application2" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/hello_world.cmx") |
| dest = "hello_world.cmx" |
| }, |
| { |
| path = rebase_path("meta/hello_world2.cmx") |
| dest = "hello_world2.cmx" |
| }, |
| ] |
| } |
| |
| executable("hello_world_test") { |
| testonly = true |
| sources = [ "hello_world_test.cc" ] |
| deps = [ "//src/lib/fxl/test:gtest_main" ] |
| } |
| |
| test_package("component_hello_world_tests") { |
| deps = [ ":hello_world_test" ] |
| |
| tests = [ |
| { |
| name = "hello_world_test" |
| environments = [ emu_env ] |
| }, |
| ] |
| } |