| # 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/components.gni") |
| import("//build/config.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//src/sys/core/build/core_shard.gni") |
| |
| rustc_library("lib") { |
| name = "sl4f_lib" |
| with_unit_tests = true |
| edition = "2021" |
| |
| deps = [ |
| "//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.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.buildinfo:fuchsia.buildinfo-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.network:fuchsia.hardware.network-rustc", |
| "//sdk/fidl/fuchsia.hardware.power.statecontrol:fuchsia.hardware.power.statecontrol-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.intl:fuchsia.intl-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-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.math:fuchsia.math-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.modular.session:fuchsia.modular.session-rustc", |
| "//sdk/fidl/fuchsia.net:fuchsia.net-rustc", |
| "//sdk/fidl/fuchsia.net.debug:fuchsia.net.debug-rustc", |
| "//sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces-rustc", |
| "//sdk/fidl/fuchsia.net.interfaces.admin:fuchsia.net.interfaces.admin-rustc", |
| "//sdk/fidl/fuchsia.paver:fuchsia.paver-rustc", |
| "//sdk/fidl/fuchsia.recovery:fuchsia.recovery-rustc", |
| "//sdk/fidl/fuchsia.session:fuchsia.session-rustc", |
| "//sdk/fidl/fuchsia.settings:fuchsia.settings-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2-rustc", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem-rustc", |
| "//sdk/fidl/fuchsia.testing.sl4f:fuchsia.testing.sl4f-rustc", |
| "//sdk/fidl/fuchsia.tracing.controller:fuchsia.tracing.controller-rustc", |
| "//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition-rustc", |
| "//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input-rustc", |
| "//sdk/fidl/fuchsia.ui.scenic:fuchsia.ui.scenic-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.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", |
| "//sdk/lib/syslog:client_includes", |
| "//src/camera/bin/virtual_camera:fuchsia.camera.test.virtualcamera-rustc", |
| "//src/connectivity/bluetooth/lib/bt-avdtp", |
| "//src/connectivity/bluetooth/lib/bt-rfcomm", |
| "//src/connectivity/bluetooth/lib/fuchsia-bluetooth", |
| "//src/connectivity/bluetooth/testing/test-call-manager", |
| "//src/connectivity/bluetooth/testing/test-rfcomm-client", |
| "//src/connectivity/lowpan/lib/lowpan_driver_common", |
| "//src/connectivity/lowpan/tools/lowpanctl", |
| "//src/connectivity/wlan/lib/common/rust:wlan-common", |
| "//src/connectivity/wlan/lib/ieee80211", |
| "//src/connectivity/wlan/testing/wlan-service-util", |
| "//src/lib/async-utils", |
| "//src/lib/component_hub", |
| "//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-fs", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/mapped-vmo", |
| "//src/lib/network/fidl_fuchsia_net_ext", |
| "//src/lib/network/fidl_fuchsia_net_interfaces_ext", |
| "//src/lib/storage/vfs/rust:vfs", |
| "//src/lib/syslog/rust:syslog", |
| "//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/moniker", |
| "//src/testing/metrics-logger/fuchsia.metricslogger.test:fuchsia.metricslogger.test-rustc", |
| "//src/testing/sl4f/fidl:fuchsia.test.audio.recording-rustc", |
| "//src/testing/sl4f/fidl:fuchsia.testing.proxy-rustc", |
| "//src/testing/system-metrics-logger/fuchsia.systemmetrics.test:fuchsia.systemmetrics.test-rustc", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:async-channel", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:base64", |
| "//third_party/rust_crates:bytes", |
| "//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:hyper", |
| "//third_party/rust_crates:itertools", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:maplit", |
| "//third_party/rust_crates:num-derive", |
| "//third_party/rust_crates:num-traits", |
| "//third_party/rust_crates:once_cell", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:regex", |
| "//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", |
| ] |
| |
| test_deps = [ |
| "//src/lib/test_util", |
| "//src/testing/fidl:placeholders-rustc", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:pin-utils", |
| ] |
| |
| sources = [ |
| "src/audio/commands.rs", |
| "src/audio/mod.rs", |
| "src/audio/types.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/mod.rs", |
| "src/bluetooth/profile_server_facade.rs", |
| "src/bluetooth/types.rs", |
| "src/common_utils/buffer.rs", |
| "src/common_utils/common.rs", |
| "src/common_utils/error.rs", |
| "src/common_utils/fidl.rs", |
| "src/common_utils/lowpan_context.rs", |
| "src/common_utils/mod.rs", |
| "src/common_utils/namespace_binder.rs", |
| "src/common_utils/test.rs", |
| "src/component/commands.rs", |
| "src/component/facade.rs", |
| "src/component/mod.rs", |
| "src/component/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/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/input/commands.rs", |
| "src/input/facade.rs", |
| "src/input/mod.rs", |
| "src/input/types.rs", |
| "src/lib.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/modular/commands.rs", |
| "src/modular/facade.rs", |
| "src/modular/mod.rs", |
| "src/modular/types.rs", |
| "src/netstack/commands.rs", |
| "src/netstack/facade.rs", |
| "src/netstack/mod.rs", |
| "src/paver/commands.rs", |
| "src/paver/facade.rs", |
| "src/paver/mod.rs", |
| "src/paver/types.rs", |
| "src/power/commands.rs", |
| "src/power/facade.rs", |
| "src/power/mod.rs", |
| "src/power/types.rs", |
| "src/proxy/commands.rs", |
| "src/proxy/facade.rs", |
| "src/proxy/mod.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/system_metrics/commands.rs", |
| "src/system_metrics/facade.rs", |
| "src/system_metrics/mod.rs", |
| "src/system_metrics/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/virtual_camera/commands.rs", |
| "src/virtual_camera/facade.rs", |
| "src/virtual_camera/mod.rs", |
| "src/virtual_camera/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 = "2021" |
| |
| deps = [ |
| ":lib", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-hyper", |
| "//src/lib/syslog/rust:syslog", |
| "//third_party/rust_crates:async-channel", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:hyper", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:parking_lot", |
| ] |
| |
| sources = [ "src/main.rs" ] |
| } |
| |
| fuchsia_component("sl4f_comp") { |
| component_name = "sl4f" |
| manifest = "meta/sl4f.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_component("data_proxy_comp") { |
| component_name = "data_proxy" |
| manifest = "proxy/meta/data_proxy.cml" |
| deps = [ "proxy:bin" ] |
| } |
| |
| fuchsia_component("audio_recording_comp") { |
| component_name = "audio_recording" |
| manifest = "audio_recording/meta/audio_recording.cml" |
| deps = [ "audio_recording:bin" ] |
| } |
| |
| core_shard("sl4f_core_shard") { |
| shard_file = "meta/sl4f.core_shard.cml" |
| } |
| |
| core_shard("sl4f_terminal_core_shard") { |
| shard_file = "meta/sl4f_terminal.core_shard.cml" |
| } |
| |
| # WARNING: Known to infrastructure. |
| fuchsia_package("sl4f") { |
| package_name = "sl4f" |
| deps = [ |
| ":audio_recording_comp", |
| ":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.cml" |
| deps = [ |
| ":fake_alpha", |
| ":fake_cast", |
| ":fake_misc", |
| ":fake_playready", |
| ":fake_weave", |
| ":fake_widevine", |
| ":lib_test", |
| ":sl4f-server-tests-files", |
| ] |
| } |
| |
| components = [ |
| "alpha", |
| "cast", |
| "misc", |
| "playready", |
| "weave", |
| "widevine", |
| ] |
| |
| foreach(comp, components) { |
| fuchsia_component("fake_${comp}") { |
| testonly = true |
| component_name = "fake_${comp}" |
| manifest = "meta/fake_${comp}_providers.cml" |
| deps = [ "//src/factory/fake_factory_store_providers:bin" ] |
| } |
| } |
| |
| fuchsia_unittest_package("sl4f-tests") { |
| deps = [ ":bin_test" ] |
| } |
| |
| group("service-tests") { |
| testonly = true |
| deps = [ ":sl4f-service-tests" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":service-tests", |
| ":sl4f-tests", |
| "proxy:data-proxy-test", |
| ] |
| } |