on master help sign in
enable rendering in integration tests (#5819)
b2e83f8Skyler Hawthorne
.cargo/config.toml+1−1
@@ -1,3 +1,3 @@
1[alias]
1[alias]
2xtask = "run --package xtask --"
2xtask = "run --package xtask --"
3−integration-test = "test --features integration --workspace --test integration"
3+integration-test = "test --features integration --profile integration --workspace --test integration"
Cargo.toml+6
@@ -25,3 +25,9 @@ lto = "fat"
25codegen-units = 1
25codegen-units = 1
26# strip = "debuginfo" # TODO: or strip = true
26# strip = "debuginfo" # TODO: or strip = true
27opt-level = 3
27opt-level = 3
28+
29+[profile.integration]
30+inherits = "test"
31+package.helix-core.opt-level = 2
32+package.helix-tui.opt-level = 2
33+package.helix-term.opt-level = 2
helix-term/src/application.rs−4
@@ -277,10 +277,6 @@ impl Application {
277 Ok(app)
277 Ok(app)
278 }
278 }
279
279
280− #[cfg(feature = "integration")]
281− async fn render(&mut self) {}
282−
283− #[cfg(not(feature = "integration"))]
284 async fn render(&mut self) {
280 async fn render(&mut self) {
285 let mut cx = crate::compositor::Context {
281 let mut cx = crate::compositor::Context {
286 editor: &mut self.editor,
282 editor: &mut self.editor,
helix-term/tests/test/write.rs+1−1
@@ -70,7 +70,7 @@ async fn test_write_quit() -> anyhow::Result<()> {
70async fn test_write_concurrent() -> anyhow::Result<()> {
70async fn test_write_concurrent() -> anyhow::Result<()> {
71 let mut file = tempfile::NamedTempFile::new()?;
71 let mut file = tempfile::NamedTempFile::new()?;
72 let mut command = String::new();
72 let mut command = String::new();
73− const RANGE: RangeInclusive<i32> = 1..=5000;
73+ const RANGE: RangeInclusive<i32> = 1..=1000;
74 let mut app = helpers::AppBuilder::new()
74 let mut app = helpers::AppBuilder::new()
75 .with_file(file.path(), None)
75 .with_file(file.path(), None)
76 .build()?;
76 .build()?;