Sprint 0 — industrialisation : CI, tracing, tests xdg-shell, GPLv3

5 livrables d'industrialisation posés avant la phase 13 (client réel).

- .gitlab-ci.yml : pipeline minimal (fmt-check + tests core +
  tests frontend nightly). Pas de cross-compile Redox dans le MVP.
- rustfmt.toml + fmt.sh : config formatter racine + boucle sur les 23
  crates ; fmt sweep appliqué (d'où les diffs cosmétiques).
- tracing dans wayland-frontend : 22 println/eprintln remplacés par
  debug/info/warn/error selon sévérité. Préfixe "[frontend]"
  supprimé (le target tracing le fournit).
- tracing-subscriber dans le compositor : TeeWriter écrit sur
  stdout + /scheme/debug, filtre via RUST_LOG (défaut info).
  DebugSink/dlog supprimés.
- 15 tests unitaires xdg-shell après extraction de 2 helpers libres
  (clamp_to_min_max + should_throttle_configure). Couvre
  compute_resize_geom, contraintes min/max et throttling configure.
- LICENSE (GPLv3 texte officiel FSF) + .editorconfig.

Total tests : 27 → 42 automatisés (compositor-core + frontend).

Leyoda 2026 – GPLv3
This commit is contained in:
Votre Nom 2026-05-14 20:46:07 +02:00
parent 2150f31d82
commit 8795f39f08
30 changed files with 1373 additions and 298 deletions

View file

@ -157,7 +157,10 @@ unsafe fn child_main(child_sock: OwnedFd) -> ! {
};
eprintln!(
"[poc CLIENT] shm '{}' size={} mapped at {:p} fd={}",
SHM_NAME, SHM_BYTES, map, shm_fd.as_raw_fd()
SHM_NAME,
SHM_BYTES,
map,
shm_fd.as_raw_fd()
);
// Dessine le pattern ARGB déterministe
@ -188,7 +191,11 @@ unsafe fn child_main(child_sock: OwnedFd) -> ! {
}
unsafe fn parent_main(parent_sock: OwnedFd, child_pid: libc::pid_t) -> Result<(), String> {
eprintln!("[poc SERVER pid={}] waiting for fd from child {}", libc::getpid(), child_pid);
eprintln!(
"[poc SERVER pid={}] waiting for fd from child {}",
libc::getpid(),
child_pid
);
let received = recv_fd_from(parent_sock.as_raw_fd())?;
let recv_raw = received.as_raw_fd();
@ -213,16 +220,15 @@ unsafe fn parent_main(parent_sock: OwnedFd, child_pid: libc::pid_t) -> Result<()
}
if !mismatches.is_empty() {
for (x, y, got, want) in &mismatches {
eprintln!(
"[poc SERVER] MISMATCH at ({x},{y}): got {got:#010x} want {want:#010x}"
);
eprintln!("[poc SERVER] MISMATCH at ({x},{y}): got {got:#010x} want {want:#010x}");
}
return Err(format!("{} pixel mismatches over {}", mismatches.len(), W * H));
return Err(format!(
"{} pixel mismatches over {}",
mismatches.len(),
W * H
));
}
eprintln!(
"[poc SERVER] all {} pixels match expected pattern",
W * H
);
eprintln!("[poc SERVER] all {} pixels match expected pattern", W * H);
// Bonus : dump en PPM pour visualisation (P6 binaire RGB)
match write_ppm(PPM_OUTPUT, pixels, W, H) {
@ -240,9 +246,7 @@ unsafe fn parent_main(parent_sock: OwnedFd, child_pid: libc::pid_t) -> Result<()
return Err(format!("waitpid: {}", errno_str()));
}
if !libc::WIFEXITED(status) || libc::WEXITSTATUS(status) != 0 {
return Err(format!(
"child exited abnormally: status={status}"
));
return Err(format!("child exited abnormally: status={status}"));
}
eprintln!("[poc SERVER] child reaped cleanly");