| # 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/config.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//src/sys/build/components.gni") |
| |
| rustc_library("lib") { |
| name = "sl4f_lib" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| "//garnet/lib/rust/files_async", |
| "//garnet/lib/rust/io_util", |
| "//sdk/fidl/fuchsia.auth:fuchsia.auth-rustc", |
| "//sdk/fidl/fuchsia.bluetooth:fuchsia.bluetooth-rustc", |
| "//sdk/fidl/fuchsia.bluetooth.avdtp:fuchsia.bluetooth.avdtp-rustc", |
| "//sdk/fidl/fuchsia.bluetooth.avrcp:fuchsia.bluetooth.avrcp-rustc", |
| "//sdk/fidl/fuchsia.bluetooth.bredr:fuchsia.bluetooth.bredr-rustc", |
| "//sdk/fidl/fuchsia.bluetooth.control:fuchsia.bluetooth.control-rustc", |
| "//sdk/fidl/fuchsia.bluetooth.gatt:fuchsia.bluetooth.gatt-rustc", |
| "//sdk/fidl/fuchsia.bluetooth.hfp:fuchsia.bluetooth.hfp-rustc", |
| "//sdk/fidl/fuchsia.bluetooth.le:fuchsia.bluetooth.le-rustc", |
| "//sdk/fidl/fuchsia.bluetooth.sys:fuchsia.bluetooth.sys-rustc", |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot-rustc", |
| "//sdk/fidl/fuchsia.developer.tiles:fuchsia.developer.tiles-rustc", |
| "//sdk/fidl/fuchsia.device:fuchsia.device-rustc", |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics-rustc", |
| "//sdk/fidl/fuchsia.factory:fuchsia.factory-rustc", |
| "//sdk/fidl/fuchsia.factory.lowpan:fuchsia.factory.lowpan-rustc", |
| "//sdk/fidl/fuchsia.feedback:fuchsia.feedback-rustc", |
| "//sdk/fidl/fuchsia.hardware.adc:fuchsia.hardware.adc-rustc", |
| "//sdk/fidl/fuchsia.hardware.backlight:fuchsia.hardware.backlight-rustc", |
| "//sdk/fidl/fuchsia.hardware.cpu.ctrl:fuchsia.hardware.cpu.ctrl-rustc", |
| "//sdk/fidl/fuchsia.hardware.ethernet:fuchsia.hardware.ethernet-rustc", |
| "//sdk/fidl/fuchsia.hardware.gpio:fuchsia.hardware.gpio-rustc", |
| "//sdk/fidl/fuchsia.hardware.i2c:fuchsia.hardware.i2c-rustc", |
| "//sdk/fidl/fuchsia.hardware.light:fuchsia.hardware.light-rustc", |
| "//sdk/fidl/fuchsia.hardware.power.statecontrol:fuchsia.hardware.power.statecontrol-rustc", |
| "//sdk/fidl/fuchsia.hardware.ram.metrics:fuchsia.hardware.ram.metrics-rustc", |
| "//sdk/fidl/fuchsia.hardware.temperature:fuchsia.hardware.temperature-rustc", |
| "//sdk/fidl/fuchsia.hwinfo:fuchsia.hwinfo-rustc", |
| "//sdk/fidl/fuchsia.images:fuchsia.images-rustc", |
| "//sdk/fidl/fuchsia.input.report:fuchsia.input.report-rustc", |
| "//sdk/fidl/fuchsia.intl:fuchsia.intl-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.kernel:fuchsia.kernel-rustc", |
| "//sdk/fidl/fuchsia.location.namedplace:fuchsia.location.namedplace-rustc", |
| "//sdk/fidl/fuchsia.location.position:fuchsia.location.position-rustc", |
| "//sdk/fidl/fuchsia.lowpan:fuchsia.lowpan-rustc", |
| "//sdk/fidl/fuchsia.lowpan.device:fuchsia.lowpan.device-rustc", |
| "//sdk/fidl/fuchsia.lowpan.test:fuchsia.lowpan.test-rustc", |
| "//sdk/fidl/fuchsia.media:fuchsia.media-rustc", |
| "//sdk/fidl/fuchsia.mem:fuchsia.mem-rustc", |
| "//sdk/fidl/fuchsia.modular:fuchsia.modular-rustc", |
| "//sdk/fidl/fuchsia.modular.internal:fuchsia.modular.internal-rustc", |
| "//sdk/fidl/fuchsia.net:fuchsia.net-rustc", |
| "//sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces-rustc", |
| "//sdk/fidl/fuchsia.net.stack:fuchsia.net.stack-rustc", |
| "//sdk/fidl/fuchsia.netstack:fuchsia.netstack-rustc", |
| "//sdk/fidl/fuchsia.paver:fuchsia.paver-rustc", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//sdk/fidl/fuchsia.power:fuchsia.power-rustc", |
| "//sdk/fidl/fuchsia.power:fuchsia.power.test-rustc", |
| "//sdk/fidl/fuchsia.recovery:fuchsia.recovery-rustc", |
| "//sdk/fidl/fuchsia.settings:fuchsia.settings-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/fidl/fuchsia.sysinfo:fuchsia.sysinfo-rustc", |
| "//sdk/fidl/fuchsia.test.manager:fuchsia.test.manager-rustc", |
| "//sdk/fidl/fuchsia.testing.sl4f:fuchsia.testing.sl4f-rustc", |
| "//sdk/fidl/fuchsia.time:fuchsia.time-rustc", |
| "//sdk/fidl/fuchsia.tracing.controller:fuchsia.tracing.controller-rustc", |
| "//sdk/fidl/fuchsia.ui.app:fuchsia.ui.app-rustc", |
| "//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input-rustc", |
| "//sdk/fidl/fuchsia.ui.policy:fuchsia.ui.policy-rustc", |
| "//sdk/fidl/fuchsia.ui.scenic:fuchsia.ui.scenic-rustc", |
| "//sdk/fidl/fuchsia.update:fuchsia.update-rustc", |
| "//sdk/fidl/fuchsia.update.channelcontrol:fuchsia.update.channelcontrol-rustc", |
| "//sdk/fidl/fuchsia.virtualaudio:fuchsia.virtualaudio-rustc", |
| "//sdk/fidl/fuchsia.weave:fuchsia.weave-rustc", |
| "//sdk/fidl/fuchsia.web:fuchsia.web-rustc", |
| "//sdk/fidl/fuchsia.wlan.common:fuchsia.wlan.common-rustc", |
| "//sdk/fidl/fuchsia.wlan.device:fuchsia.wlan.device-rustc", |
| "//sdk/fidl/fuchsia.wlan.device.service:fuchsia.wlan.device.service-rustc", |
| "//sdk/fidl/fuchsia.wlan.internal:fuchsia.wlan.internal-rustc", |
| "//sdk/fidl/fuchsia.wlan.policy:fuchsia.wlan.policy-rustc", |
| "//sdk/fidl/fuchsia.wlan.product.deprecatedconfiguration:fuchsia.wlan.product.deprecatedconfiguration-rustc", |
| "//sdk/fidl/fuchsia.wlan.sme:fuchsia.wlan.sme-rustc", |
| "//src/connectivity/bluetooth/lib/bt-avdtp", |
| "//src/connectivity/bluetooth/lib/fuchsia-bluetooth", |
| "//src/connectivity/lowpan/lib/lowpan_driver_common", |
| "//src/connectivity/lowpan/tools/lowpanctl", |
| "//src/connectivity/wlan/testing/wlan-service-util", |
| "//src/lib/async-utils", |
| "//src/lib/diagnostics/reader/rust", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/mapped-vmo", |
| "//src/lib/network/fidl_fuchsia_hardware_ethernet_ext", |
| "//src/lib/storage/fuchsia-vfs-watcher", |
| "//src/lib/storage/pseudo-fs", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/test_executor/rust:test_executor", |
| "//src/lib/ui/fuchsia-scenic", |
| "//src/lib/ui/input-synthesis", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/power/temperature-logger/fuchsia.thermal.test:fuchsia.thermal.test-rustc", |
| "//src/sys/lib/fidl-fuchsia-pkg-ext", |
| "//src/testing/sl4f/fidl:fuchsia.testing.proxy-rustc", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:base64", |
| "//third_party/rust_crates:byteorder", |
| "//third_party/rust_crates:derivative", |
| "//third_party/rust_crates:eui48", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:glob", |
| "//third_party/rust_crates:hex", |
| "//third_party/rust_crates:maplit", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:num-derive", |
| "//third_party/rust_crates:num-traits", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:pin-utils", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:regex", |
| "//third_party/rust_crates:rouille", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:slab", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:uuid", |
| "//third_party/rust_crates:void", |
| ] |
| |
| test_deps = [ |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-url", |
| "//src/lib/storage/pseudo-fs", |
| "//third_party/rust_crates:http", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:maplit", |
| ] |
| |
| sources = [ |
| "src/adc/commands.rs", |
| "src/adc/facade.rs", |
| "src/adc/mod.rs", |
| "src/adc/types.rs", |
| "src/audio/commands.rs", |
| "src/audio/facade.rs", |
| "src/audio/mod.rs", |
| "src/audio/types.rs", |
| "src/backlight/commands.rs", |
| "src/backlight/facade.rs", |
| "src/backlight/mod.rs", |
| "src/backlight/types.rs", |
| "src/basemgr/commands.rs", |
| "src/basemgr/facade.rs", |
| "src/basemgr/mod.rs", |
| "src/basemgr/types.rs", |
| "src/battery_simulator/commands.rs", |
| "src/battery_simulator/facade.rs", |
| "src/battery_simulator/mod.rs", |
| "src/bluetooth/avdtp_facade.rs", |
| "src/bluetooth/avrcp_facade.rs", |
| "src/bluetooth/ble_advertise_facade.rs", |
| "src/bluetooth/bt_sys_facade.rs", |
| "src/bluetooth/commands.rs", |
| "src/bluetooth/constants.rs", |
| "src/bluetooth/facade.rs", |
| "src/bluetooth/gatt_client_facade.rs", |
| "src/bluetooth/gatt_server_facade.rs", |
| "src/bluetooth/hfp_facade.rs", |
| "src/bluetooth/mod.rs", |
| "src/bluetooth/profile_server_facade.rs", |
| "src/bluetooth/types.rs", |
| "src/boot_arguments/commands.rs", |
| "src/boot_arguments/facade.rs", |
| "src/boot_arguments/mod.rs", |
| "src/boot_arguments/types.rs", |
| "src/common_utils/common.rs", |
| "src/common_utils/error.rs", |
| "src/common_utils/lowpan_context.rs", |
| "src/common_utils/mod.rs", |
| "src/common_utils/test.rs", |
| "src/component/commands.rs", |
| "src/component/facade.rs", |
| "src/component/mod.rs", |
| "src/component/types.rs", |
| "src/cpu_ctrl/commands.rs", |
| "src/cpu_ctrl/facade.rs", |
| "src/cpu_ctrl/mod.rs", |
| "src/cpu_ctrl/types.rs", |
| "src/device/commands.rs", |
| "src/device/facade.rs", |
| "src/device/mod.rs", |
| "src/device/types.rs", |
| "src/diagnostics/commands.rs", |
| "src/diagnostics/facade.rs", |
| "src/diagnostics/mod.rs", |
| "src/diagnostics/types.rs", |
| "src/factory_reset/commands.rs", |
| "src/factory_reset/facade.rs", |
| "src/factory_reset/mod.rs", |
| "src/factory_reset/types.rs", |
| "src/factory_store/commands.rs", |
| "src/factory_store/facade.rs", |
| "src/factory_store/mod.rs", |
| "src/factory_store/types.rs", |
| "src/feedback_data_provider/commands.rs", |
| "src/feedback_data_provider/facade.rs", |
| "src/feedback_data_provider/mod.rs", |
| "src/feedback_data_provider/types.rs", |
| "src/fidl/mod.rs", |
| "src/fidl/sl4f.rs", |
| "src/file/commands.rs", |
| "src/file/facade.rs", |
| "src/file/mod.rs", |
| "src/file/types.rs", |
| "src/gpio/commands.rs", |
| "src/gpio/facade.rs", |
| "src/gpio/mod.rs", |
| "src/gpio/types.rs", |
| "src/hardware_power_statecontrol/commands.rs", |
| "src/hardware_power_statecontrol/facade.rs", |
| "src/hardware_power_statecontrol/mod.rs", |
| "src/hwinfo/commands.rs", |
| "src/hwinfo/facade.rs", |
| "src/hwinfo/mod.rs", |
| "src/hwinfo/types.rs", |
| "src/i2c/commands.rs", |
| "src/i2c/facade.rs", |
| "src/i2c/mod.rs", |
| "src/i2c/types.rs", |
| "src/input/commands.rs", |
| "src/input/facade.rs", |
| "src/input/mod.rs", |
| "src/input/types.rs", |
| "src/input_report/commands.rs", |
| "src/input_report/facade.rs", |
| "src/input_report/mod.rs", |
| "src/input_report/types.rs", |
| "src/kernel/commands.rs", |
| "src/kernel/facade.rs", |
| "src/kernel/mod.rs", |
| "src/kernel/types.rs", |
| "src/lib.rs", |
| "src/light/commands.rs", |
| "src/light/facade.rs", |
| "src/light/mod.rs", |
| "src/light/types.rs", |
| "src/location/commands.rs", |
| "src/location/emergency_provider_facade.rs", |
| "src/location/mod.rs", |
| "src/location/regulatory_region_facade.rs", |
| "src/location/types.rs", |
| "src/logging/commands.rs", |
| "src/logging/facade.rs", |
| "src/logging/mod.rs", |
| "src/logging/types.rs", |
| "src/netstack/commands.rs", |
| "src/netstack/facade.rs", |
| "src/netstack/mod.rs", |
| "src/netstack/types.rs", |
| "src/paver/commands.rs", |
| "src/paver/facade.rs", |
| "src/paver/mod.rs", |
| "src/paver/types.rs", |
| "src/proxy/commands.rs", |
| "src/proxy/facade.rs", |
| "src/proxy/mod.rs", |
| "src/ram/commands.rs", |
| "src/ram/facade.rs", |
| "src/ram/mod.rs", |
| "src/ram/types.rs", |
| "src/repository_manager/commands.rs", |
| "src/repository_manager/facade.rs", |
| "src/repository_manager/mod.rs", |
| "src/repository_manager/types.rs", |
| "src/scenic/commands.rs", |
| "src/scenic/facade.rs", |
| "src/scenic/mod.rs", |
| "src/scenic/types.rs", |
| "src/server/constants.rs", |
| "src/server/mod.rs", |
| "src/server/sl4f.rs", |
| "src/server/sl4f_executor.rs", |
| "src/server/sl4f_types.rs", |
| "src/setui/commands.rs", |
| "src/setui/facade.rs", |
| "src/setui/mod.rs", |
| "src/setui/types.rs", |
| "src/sysinfo/commands.rs", |
| "src/sysinfo/facade.rs", |
| "src/sysinfo/mod.rs", |
| "src/sysinfo/types.rs", |
| "src/temperature/commands.rs", |
| "src/temperature/facade.rs", |
| "src/temperature/mod.rs", |
| "src/temperature/types.rs", |
| "src/tiles/commands.rs", |
| "src/tiles/facade.rs", |
| "src/tiles/mod.rs", |
| "src/tiles/types.rs", |
| "src/time/commands.rs", |
| "src/time/facade.rs", |
| "src/time/mod.rs", |
| "src/traceutil/commands.rs", |
| "src/traceutil/facade.rs", |
| "src/traceutil/mod.rs", |
| "src/traceutil/types.rs", |
| "src/tracing/commands.rs", |
| "src/tracing/facade.rs", |
| "src/tracing/mod.rs", |
| "src/tracing/types.rs", |
| "src/update/commands.rs", |
| "src/update/facade.rs", |
| "src/update/mod.rs", |
| "src/update/types.rs", |
| "src/weave/commands.rs", |
| "src/weave/facade.rs", |
| "src/weave/mod.rs", |
| "src/weave/types.rs", |
| "src/webdriver/commands.rs", |
| "src/webdriver/facade.rs", |
| "src/webdriver/mod.rs", |
| "src/webdriver/types.rs", |
| "src/wlan/commands.rs", |
| "src/wlan/facade.rs", |
| "src/wlan/mod.rs", |
| "src/wlan/types.rs", |
| "src/wlan_deprecated/commands.rs", |
| "src/wlan_deprecated/facade.rs", |
| "src/wlan_deprecated/mod.rs", |
| "src/wlan_phy/commands.rs", |
| "src/wlan_phy/facade.rs", |
| "src/wlan_phy/mod.rs", |
| "src/wlan_policy/ap_facade.rs", |
| "src/wlan_policy/commands.rs", |
| "src/wlan_policy/facade.rs", |
| "src/wlan_policy/mod.rs", |
| "src/wlan_policy/types.rs", |
| "src/wpan/commands.rs", |
| "src/wpan/facade.rs", |
| "src/wpan/mod.rs", |
| "src/wpan/types.rs", |
| ] |
| } |
| |
| rustc_binary("bin") { |
| name = "sl4f" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| ":lib", |
| "//src/lib/fuchsia-async", |
| "//src/lib/syslog/rust:syslog", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:rouille", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| sources = [ "src/main.rs" ] |
| } |
| |
| fuchsia_component("sl4f_comp") { |
| component_name = "sl4f" |
| manifest = "meta/sl4f.cmx" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_component("data_proxy_comp") { |
| component_name = "data_proxy" |
| manifest = "proxy/meta/data_proxy.cmx" |
| deps = [ "proxy:bin" ] |
| } |
| |
| # WARNING: Known to infrastructure. |
| fuchsia_package("sl4f") { |
| deps = [ |
| ":data_proxy_comp", |
| ":sl4f_comp", |
| ] |
| } |
| |
| resource("sl4f-server-tests-files") { |
| sources = [ |
| "testdata/alpha_factory_store.config", |
| "testdata/cast_factory_store.config", |
| "testdata/misc_factory_store.config", |
| "testdata/playready_factory_store.config", |
| "testdata/weave_factory_store.config", |
| "testdata/widevine_factory_store.config", |
| ] |
| outputs = [ "data/{{source_file_part}}" ] |
| } |
| |
| fuchsia_unittest_package("sl4f-service-tests") { |
| manifest = "meta/sl4f_lib_lib_test.cmx" |
| deps = [ |
| ":lib_test", |
| ":sl4f-server-tests-files", |
| ] |
| } |
| |
| config_data("fake-factory-store-providers-config") { |
| for_pkg = "fake_factory_store_providers" |
| sources = [ |
| "testdata/alpha_factory_store.config", |
| "testdata/cast_factory_store.config", |
| "testdata/misc_factory_store.config", |
| "testdata/playready_factory_store.config", |
| "testdata/weave_factory_store.config", |
| "testdata/widevine_factory_store.config", |
| ] |
| } |
| |
| fuchsia_unittest_package("sl4f-tests") { |
| deps = [ ":bin_test" ] |
| } |
| |
| group("service-tests") { |
| testonly = true |
| deps = [ |
| ":fake-factory-store-providers-config", |
| ":sl4f-service-tests", |
| "//src/factory/fake_factory_store_providers", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":service-tests", |
| ":sl4f-tests", |
| "proxy:data-proxy-test", |
| ] |
| } |
| |
| config_data("sl4f_sysmgr_config") { |
| for_pkg = "sysmgr" |
| outputs = [ "sl4f.config" ] |
| sources = [ "config/sl4f_sysmgr.config" ] |
| } |