blob: cd9e8161658f7c9c5743d4671a18e2974d48a0c7 [file] [log] [blame] [edit]
# 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("//build/components.gni")
import("//build/fidl/toolchain.gni")
import("//build/test.gni")
import("./generate_fidl_json.gni")
distribution_fidl_json("fidl_json_sdk") {
fidl_lists = [ "$root_build_dir/all_fidl_sdk_json.txt" ]
deps = [ "//sdk:all_fidl_sdk_json" ]
}
distribution_fidl_json("fidl_json_additional") {
fidl_deps = [
"//sdk/fidl/fuchsia.boot",
"//sdk/fidl/fuchsia.device.manager",
"//sdk/fidl/fuchsia.power.battery",
]
}
group("josh-test-base") {
testonly = true
deps = [
":fidl_json_additional",
":fidl_json_sdk",
"//src/developer/shell/josh:bin",
"//src/developer/shell/josh/lib:spawn_child_test_util",
]
}
fuchsia_test_component("josh-log-tests-component") {
component_name = "josh_log_tests_bin"
manifest = "meta/josh_log_tests_bin.cml"
deps = [ "//src/developer/shell/josh:josh_log_tests_bin" ]
}
fuchsia_test_package("josh-log-tests") {
test_specs = {
log_settings = {
max_severity = "FATAL"
}
}
test_components = [ ":josh-log-tests-component" ]
deps = [ ":josh-test-base" ]
}
fuchsia_test_component("josh-tests-component") {
component_name = "josh_tests_bin"
manifest = "meta/josh_tests_bin.cml"
deps = [ "//src/developer/shell/josh:josh_tests_bin" ]
}
fuchsia_test_package("josh-tests") {
test_components = [ ":josh-tests-component" ]
deps = [ ":josh-test-base" ]
}
group("tests") {
testonly = true
deps = []
# TODO(fxbug.dev/107823): Don't block LTO builds on this test passing.
if (select_variant + [
"lto",
"thinlto",
] -
[
"lto",
"thinlto",
] == select_variant) {
deps += [
":josh-log-tests",
":josh-tests",
]
}
}
# "josh" is Javascript Object SHell.
fuchsia_shell_package("josh") {
deps = [
":fidl_json_additional",
":fidl_json_sdk",
"//src/developer/shell/josh:bin",
"//src/developer/shell/josh/console:startup_js",
]
}