Enable linux tests (#12493)

Note:
- We have disabled all tests that rely on Postgres in the Linux CI. We
only really need to test these once, and as macOS is our team's primary
platform, we'll only enable them on macOS for local reproduction.
- We have disabled all tests that rely on the font metrics. We
standardized on Zed Mono in many fonts, but our CoreText Text System and
Cosmic Text System proved to be very different in effect. We should
revisit if we decide to standardize our text system across platforms
(e.g. using Harfbuzz everywhere)
- Extended the condition timeout significantly. Our CI machines are slow
enough that this is causing spurious errors in random tests.

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
Mikayla Maki 2024-06-13 16:38:53 -07:00 committed by GitHub
parent 066cdc2297
commit 10d3ad4e33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 107 additions and 52 deletions

View file

@ -27,6 +27,7 @@ pub(crate) struct TestPlatform {
current_primary_item: Mutex<Option<ClipboardItem>>,
pub(crate) prompts: RefCell<TestPrompts>,
pub opened_url: RefCell<Option<String>>,
pub text_system: Arc<dyn PlatformTextSystem>,
weak: Weak<Self>,
}
@ -44,6 +45,15 @@ impl TestPlatform {
.expect("unable to initialize Windows OLE");
}
#[cfg(target_os = "macos")]
let text_system = Arc::new(crate::platform::mac::MacTextSystem::new());
#[cfg(target_os = "linux")]
let text_system = Arc::new(crate::platform::cosmic_text::CosmicTextSystem::new());
#[cfg(target_os = "windows")]
let text_system = Arc::new(crate::platform::windows::DirectWriteTextSystem::new().unwrap());
Rc::new_cyclic(|weak| TestPlatform {
background_executor: executor,
foreground_executor,
@ -56,6 +66,7 @@ impl TestPlatform {
current_primary_item: Mutex::new(None),
weak: weak.clone(),
opened_url: Default::default(),
text_system,
})
}
@ -132,14 +143,7 @@ impl Platform for TestPlatform {
}
fn text_system(&self) -> Arc<dyn PlatformTextSystem> {
#[cfg(target_os = "macos")]
return Arc::new(crate::platform::mac::MacTextSystem::new());
#[cfg(target_os = "linux")]
return Arc::new(crate::platform::cosmic_text::CosmicTextSystem::new());
#[cfg(target_os = "windows")]
return Arc::new(crate::platform::windows::DirectWriteTextSystem::new().unwrap());
self.text_system.clone()
}
fn run(&self, _on_finish_launching: Box<dyn FnOnce()>) {