fuchsia_bluetooth/constants.rs
1// Copyright 2019 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4#[cfg(target_os = "fuchsia")]
5use zx::MonotonicDuration;
6
7pub const DEV_DIR: &str = "/dev";
8pub const HOST_DEVICE_DIR: &str = "class/bt-host";
9pub const HCI_DEVICE_DIR: &str = "class/bt-hci";
10
11// Constants for creating bt-host component in bt-init and integration tests
12pub const BT_HOST_COLLECTION: &str = "bt-host-collection";
13pub const BT_HOST: &str = "bt-host";
14pub const BT_HOST_URL: &str = "bt-host#meta/bt-host.cm";
15
16// Use a timeout of 4 minutes on integration tests.
17//
18// This time is expected to be:
19// a) sufficient to avoid flakes due to infra or resource contention, except in many standard
20// deviations of unlikeliness
21// b) short enough to still provide useful feedback in those cases where asynchronous operations
22// fail
23// c) short enough to fail before the overall infra-imposed test timeout (currently 5 minutes),
24// so that we can produce specific test-relevant information in the case of failure.
25#[cfg(target_os = "fuchsia")]
26pub const INTEGRATION_TIMEOUT: MonotonicDuration = MonotonicDuration::from_minutes(4);