| # 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_rust", |
| "//sdk/fidl/fuchsia.bluetooth.avdtp.test:fuchsia.bluetooth.avdtp.test_rust", |
| "//sdk/fidl/fuchsia.bluetooth.avrcp:fuchsia.bluetooth.avrcp_rust", |
| "//sdk/fidl/fuchsia.bluetooth.bredr:fuchsia.bluetooth.bredr_rust", |
| "//sdk/fidl/fuchsia.bluetooth.gatt2:fuchsia.bluetooth.gatt2_rust", |
| "//sdk/fidl/fuchsia.bluetooth.hfp:fuchsia.bluetooth.hfp_rust", |
| "//sdk/fidl/fuchsia.bluetooth.le:fuchsia.bluetooth.le_rust", |
| "//sdk/fidl/fuchsia.bluetooth.sys:fuchsia.bluetooth.sys_rust", |
| "//sdk/fidl/fuchsia.buildinfo:fuchsia.buildinfo_rust", |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust", |
| "//sdk/fidl/fuchsia.developer.tiles:fuchsia.developer.tiles_rust", |
| "//sdk/fidl/fuchsia.device:fuchsia.device_rust", |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust", |
| "//sdk/fidl/fuchsia.factory:fuchsia.factory_rust", |
| "//sdk/fidl/fuchsia.factory.lowpan:fuchsia.factory.lowpan_rust", |
| "//sdk/fidl/fuchsia.feedback:fuchsia.feedback_rust", |
| "//sdk/fidl/fuchsia.hardware.network:fuchsia.hardware.network_rust", |
| "//sdk/fidl/fuchsia.hardware.power.statecontrol:fuchsia.hardware.power.statecontrol_rust", |
| "//sdk/fidl/fuchsia.hardware.temperature:fuchsia.hardware.temperature_rust", |
| "//sdk/fidl/fuchsia.hwinfo:fuchsia.hwinfo_rust", |
| "//sdk/fidl/fuchsia.images:fuchsia.images_rust", |
| "//sdk/fidl/fuchsia.intl:fuchsia.intl_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.location.namedplace:fuchsia.location.namedplace_rust", |
| "//sdk/fidl/fuchsia.location.position:fuchsia.location.position_rust", |
| "//sdk/fidl/fuchsia.lowpan:fuchsia.lowpan_rust", |
| "//sdk/fidl/fuchsia.lowpan.device:fuchsia.lowpan.device_rust", |
| "//sdk/fidl/fuchsia.lowpan.test:fuchsia.lowpan.test_rust", |
| "//sdk/fidl/fuchsia.media:fuchsia.media_rust", |
| "//sdk/fidl/fuchsia.media.sounds:fuchsia.media.sounds_rust", |
| "//sdk/fidl/fuchsia.mem:fuchsia.mem_rust", |
| "//sdk/fidl/fuchsia.net:fuchsia.net_rust", |
| "//sdk/fidl/fuchsia.net.debug:fuchsia.net.debug_rust", |
| "//sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces_rust", |
| "//sdk/fidl/fuchsia.net.interfaces.admin:fuchsia.net.interfaces.admin_rust", |
| "//sdk/fidl/fuchsia.paver:fuchsia.paver_rust", |
| "//sdk/fidl/fuchsia.recovery:fuchsia.recovery_rust", |
| "//sdk/fidl/fuchsia.session:fuchsia.session_rust", |
| "//sdk/fidl/fuchsia.settings:fuchsia.settings_rust", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust", |
| "//sdk/fidl/fuchsia.testing.sl4f:fuchsia.testing.sl4f_rust", |
| "//sdk/fidl/fuchsia.tracing.controller:fuchsia.tracing.controller_rust", |
| "//sdk/fidl/fuchsia.ui.app:fuchsia.ui.app_rust", |
| "//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition_rust", |
| "//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input_rust", |
| "//sdk/fidl/fuchsia.ui.scenic:fuchsia.ui.scenic_rust", |
| "//sdk/fidl/fuchsia.weave:fuchsia.weave_rust", |
| "//sdk/fidl/fuchsia.web:fuchsia.web_rust", |
| "//sdk/fidl/fuchsia.wlan.common:fuchsia.wlan.common_rust", |
| "//sdk/fidl/fuchsia.wlan.device.service:fuchsia.wlan.device.service_rust", |
| "//sdk/fidl/fuchsia.wlan.internal:fuchsia.wlan.internal_rust", |
| "//sdk/fidl/fuchsia.wlan.policy:fuchsia.wlan.policy_rust", |
| "//sdk/fidl/fuchsia.wlan.product.deprecatedconfiguration:fuchsia.wlan.product.deprecatedconfiguration_rust", |
| "//sdk/fidl/fuchsia.wlan.sme:fuchsia.wlan.sme_rust", |
| "//sdk/lib/syslog:client_includes", |
| "//src/camera/bin/virtual_camera:fuchsia.camera.test.virtualcamera_rust", |
| "//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/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/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/network/fidl_fuchsia_net_ext", |
| "//src/lib/network/fidl_fuchsia_net_interfaces_ext", |
| "//src/lib/storage/vfs/rust:vfs", |
| "//src/lib/ui/input-synthesis", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/lib/component-events", |
| "//src/sys/lib/component_debug", |
| "//src/testing/metrics-logger/fuchsia.metricslogger.test:fuchsia.metricslogger.test_rust", |
| "//src/testing/sl4f/fidl:fuchsia.test.audio.recording_rust", |
| "//src/testing/sl4f/fidl:fuchsia.testing.proxy_rust", |
| "//third_party/rust_crates:anyhow", |
| "//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: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:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| test_deps = [ |
| "//src/connectivity/lowpan/lib/lowpan_driver_common", |
| "//src/lib/test_util", |
| "//src/testing/fidl:placeholders_rust", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:pin-utils", |
| "//third_party/rust_crates:tempfile", |
| ] |
| |
| 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/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/flatland_example/commands.rs", |
| "src/flatland_example/facade.rs", |
| "src/flatland_example/mod.rs", |
| "src/flatland_example/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/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", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-hyper", |
| "//third_party/rust_crates:async-channel", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:hyper", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| 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", |
| ] |
| } |