fix(tests): enable logs required by GTK replay assertions

The error-only logging default suppressed replay output, causing five
GTK tests to fail and two layer-shell tests to skip their assertions.
Set RUST_LOG=debug and GHOSTTY_LOG=stderr for the child app so both replay
output and capability detection are independent of inherited settings.
Document the harness logging contract without changing application defaults.

Test plan:
- cargo test -p ghostty-rs --all-features --test gtk_replay (7 passed)
- cargo clippy, cargo clippy --benches, cargo clippy --tests
- cargo +nightly fmt and repeat the clippy checks

Related-commit: 4fb9faa
This commit is contained in:
ddidderr committed 2026-10-12 22:10:19 +02:00
1 parent 9f203f375f
commit 62e1209b37
2 files changed
+8 -1

No files matched your search

+5
View File
@@ -8,6 +8,8 @@
//!
//! Skipped (passes) when there is no display or `GHOSTTY_SKIP_GTK_REPLAY` is
//! set. The tests share the session clipboard, so they run one at a time.
//! Child processes explicitly enable debug logs on stderr: replay assertions
//! and layer-shell detection must not depend on the user's logging settings.
use std::{
path::{Path, PathBuf},
@@ -72,6 +74,9 @@ fn run(script: &str, extra: &[&str], child: &str) -> Run {
.args(extra)
.args(["-e", "sh", "-c", child])
.env("GHOSTTY_DEBUG_INPUT_SCRIPT", &script_path)
// Replay output is warn-level; Wayland capability detection is debug-level.
.env("RUST_LOG", "debug")
.env("GHOSTTY_LOG", "stderr")
.stdin(Stdio::null())
.stdout(Stdio::null())
.stderr(Stdio::piped())