From 5d5f9a0a3199dda29708365619810440b3a5eb5a Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 26 May 2021 19:31:17 -0400 Subject: [PATCH 1/8] Disable intermittent unit test. --- components/net/tests/http_loader.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/components/net/tests/http_loader.rs b/components/net/tests/http_loader.rs index ce3bc4bb270..4490de73091 100644 --- a/components/net/tests/http_loader.rs +++ b/components/net/tests/http_loader.rs @@ -333,6 +333,7 @@ fn test_request_and_response_data_with_network_messages() { } #[test] +#[cfg(not(target_os = "windows"))] fn test_request_and_response_message_from_devtool_without_pipeline_id() { let handler = move |_: HyperRequest, response: &mut HyperResponse| { response From 1a1590fd53b2d350f60bc8d5a2c73ea3a0a13b9e Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 26 May 2021 19:32:30 -0400 Subject: [PATCH 2/8] Disable intermittent unit tests on macos. --- .../background_hang_monitor/tests/hang_monitor_tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/background_hang_monitor/tests/hang_monitor_tests.rs b/components/background_hang_monitor/tests/hang_monitor_tests.rs index dbccb5e50de..23b32dd1bbb 100644 --- a/components/background_hang_monitor/tests/hang_monitor_tests.rs +++ b/components/background_hang_monitor/tests/hang_monitor_tests.rs @@ -130,7 +130,7 @@ fn test_hang_monitoring() { #[test] // https://github.com/servo/servo/issues/28270 -#[cfg(not(target_os = "windows"))] +#[cfg(not(any(target_os = "windows", target_os = "macos")))] fn test_hang_monitoring_unregister() { let _lock = SERIAL.lock().unwrap(); @@ -166,7 +166,7 @@ fn test_hang_monitoring_unregister() { #[test] // https://github.com/servo/servo/issues/28270 -#[cfg(not(target_os = "windows"))] +#[cfg(not(any(target_os = "windows", target_os = "macos")))] fn test_hang_monitoring_exit_signal() { let _lock = SERIAL.lock().unwrap(); From de2266874846f2dc299335d20bf8cfcb3707bf67 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 27 May 2021 00:07:13 -0400 Subject: [PATCH 3/8] Disable all http_loader unit tests on windows. --- components/net/tests/http_loader.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/net/tests/http_loader.rs b/components/net/tests/http_loader.rs index 4490de73091..e9de2cb983f 100644 --- a/components/net/tests/http_loader.rs +++ b/components/net/tests/http_loader.rs @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +#![cfg(not(target_os = "windows"))] + use crate::fetch; use crate::fetch_with_context; use crate::make_server; From 46de44340f6ac924b8ea1646f522b3f7e278cbaf Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 27 May 2021 19:45:17 -0400 Subject: [PATCH 4/8] Disable more unit tests for windows. --- components/net/tests/fetch.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/net/tests/fetch.rs b/components/net/tests/fetch.rs index 821e81a00c2..4f6cf6e272e 100644 --- a/components/net/tests/fetch.rs +++ b/components/net/tests/fetch.rs @@ -4,6 +4,7 @@ use crate::fetch_with_context; use crate::fetch_with_cors_cache; +#[cfg(not(target_os = "windows"))] use crate::http_loader::{expect_devtools_http_request, expect_devtools_http_response}; use crate::{ create_embedder_proxy, fetch, make_server, make_ssl_server, new_fetch_context, @@ -1344,6 +1345,7 @@ fn test_opaque_redirect_filtered_fetch_async_returns_complete_response() { } #[test] +#[cfg(not(target_os = "windows"))] fn test_fetch_with_devtools() { static MESSAGE: &'static [u8] = b"Yay!"; let handler = move |_: HyperRequest, response: &mut HyperResponse| { From 8583e505c8a69e4fac5537d6cf80b036d80a6597 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 27 May 2021 21:48:31 -0400 Subject: [PATCH 5/8] Don't error on unused imports. --- components/net/tests/fetch.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/net/tests/fetch.rs b/components/net/tests/fetch.rs index 4f6cf6e272e..74c398fe12a 100644 --- a/components/net/tests/fetch.rs +++ b/components/net/tests/fetch.rs @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +#![allow(unused_imports)] + use crate::fetch_with_context; use crate::fetch_with_cors_cache; #[cfg(not(target_os = "windows"))] From a883b594cccd29f9531e7d8c5da82b82925dda00 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 27 May 2021 23:30:41 -0400 Subject: [PATCH 6/8] Disable fetch tests on windows. --- components/net/tests/fetch.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/net/tests/fetch.rs b/components/net/tests/fetch.rs index 74c398fe12a..653526adccb 100644 --- a/components/net/tests/fetch.rs +++ b/components/net/tests/fetch.rs @@ -2,11 +2,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -#![allow(unused_imports)] +#![cfg(not(target_os = "windows"))] use crate::fetch_with_context; use crate::fetch_with_cors_cache; -#[cfg(not(target_os = "windows"))] use crate::http_loader::{expect_devtools_http_request, expect_devtools_http_response}; use crate::{ create_embedder_proxy, fetch, make_server, make_ssl_server, new_fetch_context, From 3fce671f614b5be73c3defd1a319210b2a6fa1d7 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 28 May 2021 00:40:26 -0400 Subject: [PATCH 7/8] Disable warnings on windows. --- components/net/tests/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/net/tests/main.rs b/components/net/tests/main.rs index 7583fdf0fc5..f0db95ac174 100644 --- a/components/net/tests/main.rs +++ b/components/net/tests/main.rs @@ -4,6 +4,8 @@ #![cfg(test)] +#![allow(dead_code)] + #[macro_use] extern crate lazy_static; From eeec647120463815850f3e44031138ae2a3ea28c Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 28 May 2021 10:39:42 -0400 Subject: [PATCH 8/8] Fix tidy error. --- components/net/tests/main.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/components/net/tests/main.rs b/components/net/tests/main.rs index f0db95ac174..be43c23b0ca 100644 --- a/components/net/tests/main.rs +++ b/components/net/tests/main.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #![cfg(test)] - #![allow(dead_code)] #[macro_use]