Phase 13.2.b.4 — scripts ion raccourcis pour les tests en QEMU

Pour éviter de retaper 3 lignes à chaque test runtime dans la fenêtre
QEMU graphique (sans copier-coller possible), ajout de 3 scripts ion
prêts à l'emploi dans tools/redox-scripts/ :

- test-sw    : compositor + simple_window client (phase 13.1.b)
- test-subc  : compositor + subcompositor client visuel (phase 13.2.b.3)
- test-out   : compositor + wl_output gating test (phase 13.2.a)

Tous suivent le même pattern :
  rm -f /tmp/redox-wl-comp.sock
  redox-wl-compositor &
  sleep 1
  <client>

run-qemu.sh copie maintenant tout tools/redox-scripts/* dans /usr/bin
de l'image (cp -p pour conserver +x), donc le user peut taper juste
`test-subc` ⏎ dans le shell ion Redox.

Shebang #!/usr/bin/ion : Redox sait exécuter le script directement
(le chemin /usr/bin/ion est stable).

Leyoda 2026 – GPLv3
This commit is contained in:
Votre Nom 2026-05-16 14:33:27 +02:00
parent dfb5c66453
commit 6fe321466c
4 changed files with 35 additions and 0 deletions

View file

@ -140,6 +140,15 @@ if [[ -e "$TEST_SUBCOMP_BIN" ]]; then
cp -v "$TEST_SUBCOMP_BIN" "$MOUNT/usr/bin/"
fi
# Phase 13.2.b.4 : scripts ion raccourcis (test-subc, test-sw, test-out).
# Copiés depuis tools/redox-scripts/ pour invocation 1-ligne dans le shell
# Redox. Chmod +x conservé via cp -p.
for script in "$ROOT/tools/redox-scripts"/*; do
if [[ -f "$script" ]]; then
cp -vp "$script" "$MOUNT/usr/bin/"
fi
done
# --- 4. umount avant make qemu (sinon QEMU et FUSE se battent sur le même fichier) ---
echo "==> démonter $MOUNT"
sync

8
tools/redox-scripts/test-out Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/ion
# Phase 13.2.a — Launch compositor + wl_output version gating test client.
# Le client teste binding wl_output aux v1/v2/v3 et reporte PASS/FAIL.
# Pas besoin de Ctrl+Q : le client exit puis on stoppe le compositor.
rm -f /tmp/redox-wl-comp.sock
redox-wl-compositor &
sleep 1
redox-wl-test-wl-output

10
tools/redox-scripts/test-subc Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/ion
# Phase 13.2.b.3 — Launch compositor + subcompositor test client.
# Nettoie un éventuel socket résiduel, lance le compo en background,
# attend 1s, puis lance le client de test subcompositor en avant-plan.
# Côté QEMU graphique : ESC sur la fenêtre pour exit propre du client,
# puis Ctrl+Q pour exit du compositor.
rm -f /tmp/redox-wl-comp.sock
redox-wl-compositor &
sleep 1
redox-wl-test-client-subcompositor

8
tools/redox-scripts/test-sw Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/ion
# Phase 13.1.b — Launch compositor + simple_window test client (port wayland-rs).
# Côté QEMU graphique : ESC sur la fenêtre pour exit propre du client,
# puis Ctrl+Q pour exit du compositor.
rm -f /tmp/redox-wl-comp.sock
redox-wl-compositor &
sleep 1
redox-wl-real-client-simple-window