From 5359292d10289add6736042629ab6ee8f44a1e51 Mon Sep 17 00:00:00 2001 From: Amod Malviya Date: Fri, 23 Dec 2022 22:03:08 +0530 Subject: [PATCH] attempt #3 to fix linux build #build-linux --- .github/workflows/linux.yaml | 2 +- Cargo.toml | 1 + tests/test_unix.rs | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index a4f9b1d..3ab646c 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -38,7 +38,7 @@ jobs: - uses: actions-rs/cargo@v1 name: Run Tests env: - BROWSER: firefox %s + BROWSER: firefox --screenshot %s with: command: test args: --all --locked --verbose diff --git a/Cargo.toml b/Cargo.toml index d740aaf..c876085 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,6 +48,7 @@ actix-files = "0.6" crossbeam-channel = "0.5" env_logger = "0.9.0" rand = "0.8" +serial_test = "0.10" tokio = { version = "1", features = ["full"] } urlencoding = "2.1" diff --git a/tests/test_unix.rs b/tests/test_unix.rs index cf9c65a..b4c3d3e 100644 --- a/tests/test_unix.rs +++ b/tests/test_unix.rs @@ -6,9 +6,11 @@ mod tests { const TEST_PLATFORM: &str = "unix"; use super::common::{check_browser, check_local_file}; + use serial_test::serial; use webbrowser::Browser; #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + #[serial] async fn test_open_default() { check_browser(Browser::Default, TEST_PLATFORM).await; } @@ -24,6 +26,7 @@ mod tests { } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + #[serial] async fn test_local_file_abs_path() { check_local_file(Browser::Default, None, |pb| { pb.as_os_str().to_string_lossy().into() @@ -32,6 +35,7 @@ mod tests { } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + #[serial] async fn test_local_file_rel_path() { let cwd = std::env::current_dir().expect("unable to get current dir"); check_local_file(Browser::Default, None, |pb| { @@ -45,6 +49,7 @@ mod tests { } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + #[serial] async fn test_local_file_uri() { check_local_file(Browser::Default, None, |pb| { url::Url::from_file_path(pb)