| # Copyright 2017 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/package.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| import("//third_party/cobalt/metrics_registry.gni") |
| |
| metrics_registry("wlan_metrics_registry") { |
| # This must match the ID of our Cobalt project as specified in: |
| # third_party/cobalt_config/projects.yaml |
| project_id = 3708719327 |
| generate_rust = true |
| |
| # We don't need to include a copy of our projects's Cobalt registry in our package because we |
| # rely on it being packaged with Cobalt itself |
| generate_binarypb = false |
| } |
| |
| rustc_binary("bin") { |
| name = "wlanstack" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| ":wlan_metrics_registry_rustlib", |
| "//garnet/lib/rust/io_util", |
| "//sdk/fidl/fuchsia.cobalt:fuchsia.cobalt-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.mem:fuchsia.mem-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.ieee80211:fuchsia.wlan.ieee80211-rustc", |
| "//sdk/fidl/fuchsia.wlan.internal:fuchsia.wlan.internal-rustc", |
| "//sdk/fidl/fuchsia.wlan.mesh:fuchsia.wlan.mesh-rustc", |
| "//sdk/fidl/fuchsia.wlan.minstrel:fuchsia.wlan.minstrel-rustc", |
| "//sdk/fidl/fuchsia.wlan.mlme:fuchsia.wlan.mlme-rustc", |
| "//sdk/fidl/fuchsia.wlan.sme:fuchsia.wlan.sme-rustc", |
| "//sdk/fidl/fuchsia.wlan.stats:fuchsia.wlan.stats-rustc", |
| "//sdk/fidl/fuchsia.wlan.tap:fuchsia.wlan.tap-rustc", |
| "//src/connectivity/wlan/lib/common/rust/:wlan-common", |
| "//src/connectivity/wlan/lib/eapol", |
| "//src/connectivity/wlan/lib/inspect:wlan-inspect", |
| "//src/connectivity/wlan/lib/isolated-devmgr", |
| "//src/connectivity/wlan/lib/rsn:wlan-rsn", |
| "//src/connectivity/wlan/lib/sme:wlan-sme", |
| "//src/connectivity/wlan/lib/wlan_dev", |
| "//src/lib/cobalt/rust:fuchsia-cobalt", |
| "//src/lib/diagnostics/inspect/contrib/rust", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/storage/fuchsia-vfs-watcher", |
| "//src/lib/zerocopy", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:itertools", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:maplit", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:paste", |
| "//third_party/rust_crates:pin-utils", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:void", |
| ] |
| |
| test_deps = [ |
| "//src/connectivity/wlan/testing/wlantap-client", |
| "//third_party/rust_crates:test-case", |
| ] |
| |
| sources = [ |
| "src/device.rs", |
| "src/device_watch.rs", |
| "src/future_util.rs", |
| "src/inspect.rs", |
| "src/logger.rs", |
| "src/main.rs", |
| "src/mlme_query_proxy.rs", |
| "src/service.rs", |
| "src/station/ap.rs", |
| "src/station/client.rs", |
| "src/station/mesh.rs", |
| "src/station/mod.rs", |
| "src/stats_scheduler.rs", |
| "src/telemetry/convert.rs", |
| "src/telemetry/mod.rs", |
| "src/watchable_map.rs", |
| "src/watcher_service.rs", |
| ] |
| } |
| |
| package("wlanstack") { |
| deps = [ |
| ":bin", |
| ":wlan_metrics_registry", |
| ] |
| |
| binaries = [ |
| { |
| name = "wlanstack" |
| }, |
| ] |
| meta = [ |
| { |
| path = rebase_path("meta/wlanstack.cmx") |
| dest = "wlanstack.cmx" |
| }, |
| ] |
| } |
| |
| test_package("wlanstack-tests") { |
| deps = [ ":bin_test" ] |
| |
| tests = [ |
| { |
| name = "wlanstack_bin_test" |
| environments = [ |
| { |
| dimensions = emu_env.dimensions |
| tags = [ "flaky" ] # TODO(fxbug.dev/29873) |
| }, |
| ] |
| }, |
| ] |
| } |