blob: 9fab7f3103b2d7fdd8def2f1284992d87caa7063 [file] [log] [blame]
# 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.
# Top level BUILD file for gn samples
assert(is_fuchsia)
import("//third_party/fuchsia-sdk/build/test_targets.gni")
# Simplify deployment to a package server by building and copying the sample
# `.far` packages to the top-level build directory.
copy("default") {
deps = [
"//cipd",
"//src/bouncing_ball",
"//src/calculator",
"//src/hello_world",
"//src/rot13",
]
sources = [
"${target_gen_dir}/src/bouncing_ball/bouncing_ball/bouncing_ball.far",
"${target_gen_dir}/src/calculator/calculator-example/calculator-example.far",
"${target_gen_dir}/src/hello_world/hello_world/hello_world.far",
"${target_gen_dir}/src/rot13/rot13-example/rot13-example.far",
]
outputs = [ "${root_out_dir}/{{source_file_part}}" ]
}
copy("tests") {
testonly = true
deps = [
"//src/calculator:tests",
"//src/hello_world:tests",
"//src/realm_builder:tests",
"//src/rot13:tests",
]
sources = [
"${target_gen_dir}/src/hello_world/hello_world_test/hello_world_test.far",
"${target_gen_dir}/src/calculator/engine/engine_unittest/engine_unittest.far",
"${target_gen_dir}/src/rot13/server/rot13_unittests/rot13_unittests.far",
"${target_gen_dir}/src/realm_builder/greeting_service/greeting_service.far",
"${target_gen_dir}/src/realm_builder/greeter_test/greeter_test.far",
]
outputs = [ "${root_out_dir}/{{source_file_part}}" ]
}
# Build all the targets exposed by the Fuchsia SDK.
fuchsia_sdk_test_targets("all_sdk_targets") { }