diff --git a/scripts/test_openxr_pipeline.sh b/scripts/test_openxr_pipeline.sh index 6d8d045..8aa8024 100755 --- a/scripts/test_openxr_pipeline.sh +++ b/scripts/test_openxr_pipeline.sh @@ -17,16 +17,21 @@ echo -e "${BLUE}======================================================${NC}" # 1. Vérification du service Monado echo -n "Vérification du service Monado... " +STARTED_MONADO=0 if pgrep monado-service >/dev/null 2>&1; then echo -e "${GREEN}[OK - Monado est actif]${NC}" else echo -e "${YELLOW}[Démarrage de Monado en arrière-plan...]${NC}" - ./scripts/start_monado_simulated.sh >/dev/null 2>&1 & + tail -f /dev/null | ./scripts/start_monado_simulated.sh >/tmp/monado_test.log 2>&1 & + MONADO_WRAPPER_PID=$! + STARTED_MONADO=1 + trap 'if [ "$STARTED_MONADO" -eq 1 ]; then pkill -f monado-service 2>/dev/null || true; kill "$MONADO_WRAPPER_PID" 2>/dev/null || true; fi' EXIT sleep 2 if pgrep monado-service >/dev/null 2>&1; then echo -e "${GREEN}[OK - Monado démarré]${NC}" else echo -e "${RED}[ERREUR] Impossible de contacter Monado.${NC}" + tail -n 20 /tmp/monado_test.log || true exit 1 fi fi @@ -82,10 +87,13 @@ run_mode_test "dome" "Dôme 140° (Equirect2 avec dé-distorsion)" "--lens-k1 -0 run_mode_test "cylinder" "Cylindre Incurvé 140° (Cylinder layer)" "" run_mode_test "flat" "Quad Plat Virtuel (Quad layer)" "" -# 4. Test d'initialisation de l'interface graphique GPUI avec OpenXR +# 4. Test du Mode VR Natif (--vr-only, Mode Gaming SteamOS) +run_mode_test "dome" "Mode VR Natif Gaming (--vr-only)" "--vr-only" + +# 5. Test d'initialisation de l'interface graphique GPUI avec OpenXR echo -e "\n${BLUE}--- Étape 2 : Test d'intégration IHM moderne (GPUI + OpenXR) ---${NC}" gpui_log="/tmp/openxr_test_gpui.log" -timeout 3 ./target/release/steamframe-fpv --gui-engine gpui > "$gpui_log" 2>&1 || true +timeout 3 ./target/release/steamframe-fpv > "$gpui_log" 2>&1 || true if grep -q "Changement d'état session : FOCUSED" "$gpui_log"; then echo -e "${GREEN}✔ L'interface GPUI se synchronise et alimente parfaitement la session OpenXR FOCUSED.${NC}"