test(host): make two host tests portable to Windows
The Windows host test suite hit two pre-existing portability failures (the autonomous Windows bring-up never ran `cargo test` on the VM): - `vdisplay::detect_active_session_*` asserted a non-empty XDG runtime dir — a Linux concept with no Windows equivalent. Gate just that assertion to Linux (keep the call so the fn stays used → no dead_code). - `mgmt::openapi_document_is_complete_and_checked_in` did a byte compare against the checked-in spec, which git may check out CRLF on Windows while serde_json emits LF. Compare content with `\r` stripped. Host suite now 73/73 on x86_64-pc-windows-msvc; Linux unchanged (78 ok). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -638,6 +638,8 @@ mod tests {
|
||||
// A pure probe of /proc + the runtime dir: it must not panic and must return promptly on
|
||||
// any box (CI has no graphical session → ActiveKind::None, with the runtime-dir anchor).
|
||||
let a = detect_active_session();
|
||||
// The runtime-dir anchor is a Linux (XDG) concept; Windows has no equivalent.
|
||||
#[cfg(target_os = "linux")]
|
||||
assert!(!a.env.xdg_runtime_dir.is_empty());
|
||||
// Wayland sockets are only resolved for the Wayland-protocol desktops.
|
||||
if matches!(
|
||||
|
||||
Reference in New Issue
Block a user