summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2024-01-25 13:01:57 +0100
committerLinus Färnstrand <linus@mullvad.net>2024-02-01 13:16:51 +0100
commitc91d29ea0a22ca7460d26bac7872a172ddd15aa7 (patch)
tree5592dc8ea82599843226aef6aba97c67a7de6f69 /test
parentc1038964e8f6b98cd0b0471362631f19128d6c7e (diff)
downloadmullvadvpn-c91d29ea0a22ca7460d26bac7872a172ddd15aa7.tar.xz
mullvadvpn-c91d29ea0a22ca7460d26bac7872a172ddd15aa7.zip
Set serial baud rate to zero on macOS
Diffstat (limited to 'test')
-rw-r--r--test/test-manager/src/run_tests.rs7
-rw-r--r--test/test-runner/src/main.rs7
2 files changed, 12 insertions, 2 deletions
diff --git a/test/test-manager/src/run_tests.rs b/test/test-manager/src/run_tests.rs
index 756d8d8b45..7b636643ff 100644
--- a/test/test-manager/src/run_tests.rs
+++ b/test/test-manager/src/run_tests.rs
@@ -15,7 +15,12 @@ use std::time::Duration;
use test_rpc::logging::Output;
use test_rpc::{mullvad_daemon::MullvadClientVersion, ServiceClient};
-const BAUD: u32 = 115200;
+/// The baud rate of the serial connection between the test manager and the test runner.
+/// There is a known issue with setting a baud rate at all or macOS, and the workaround
+/// is to set it to zero: https://github.com/serialport/serialport-rs/pull/58
+///
+/// Keep this constant in sync with `test-runner/src/main.rs`
+const BAUD: u32 = if cfg!(target_os = "macos") { 0 } else { 115200 };
pub async fn run(
config: tests::config::TestConfig,
diff --git a/test/test-runner/src/main.rs b/test/test-runner/src/main.rs
index d7ace9d15a..1c2c301b27 100644
--- a/test/test-runner/src/main.rs
+++ b/test/test-runner/src/main.rs
@@ -299,7 +299,12 @@ fn get_pipe_status() -> ServiceStatus {
}
}
-const BAUD: u32 = 115200;
+/// The baud rate of the serial connection between the test manager and the test runner.
+/// There is a known issue with setting a baud rate at all or macOS, and the workaround
+/// is to set it to zero: https://github.com/serialport/serialport-rs/pull/58
+///
+/// Keep this constant in sync with `test-manager/src/run_tests.rs`
+const BAUD: u32 = if cfg!(target_os = "macos") { 0 } else { 115200 };
#[derive(err_derive::Error, Debug)]
pub enum Error {