feat(runtime): preserve structured Play v2 diagnostics
Intrepid/Prometeu/Runtime/pipeline/head This commit looks good
Intrepid/Prometeu/Runtime/pipeline/head This commit looks good
Confirm loaded PBX identity, emit bounded fault envelopes and retain the primary crash report through teardown. Start background IO before audio initialization and update native protocol and process fixtures.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
//! Real process qualification: no window, slow consumer, pause and broken IPC.
|
||||
use prometeu_host_desktop_winit::studio::wire::*;
|
||||
use sha2::{Digest, Sha256};
|
||||
use std::io::{self, BufRead, Write};
|
||||
use std::net::{Shutdown, TcpListener, TcpStream};
|
||||
use std::process::{Child, Command, ExitStatus, Stdio};
|
||||
@@ -21,6 +22,8 @@ impl Session {
|
||||
let video = TcpListener::bind("127.0.0.1:0").unwrap();
|
||||
let cart = std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
|
||||
.join("../../../test-cartridges/dummy-boy");
|
||||
let program_sha256: [u8; 32] =
|
||||
Sha256::digest(std::fs::read(cart.join("program.pbx")).unwrap()).into();
|
||||
let child = Command::new(env!("CARGO_BIN_EXE_prometeu-host-desktop-winit"))
|
||||
.args(["--studio", "--run"])
|
||||
.arg(cart)
|
||||
@@ -51,6 +54,7 @@ impl Session {
|
||||
p.extend_from_slice(&control.local_addr().unwrap().port().to_le_bytes());
|
||||
p.extend_from_slice(&video.local_addr().unwrap().port().to_le_bytes());
|
||||
p.push(1);
|
||||
p.extend_from_slice(&program_sha256);
|
||||
Writer::new(session_child.stdin.take().unwrap()).send(BOOTSTRAP, 0, &p).unwrap();
|
||||
fn accept(listener: TcpListener) -> TcpStream {
|
||||
listener.set_nonblocking(true).unwrap();
|
||||
@@ -92,7 +96,9 @@ impl Session {
|
||||
};
|
||||
let ready = session.control.receive().unwrap();
|
||||
assert_eq!(ready.header.kind, READY, "{:?}", session.logs.lock().unwrap());
|
||||
assert!(ready.payload.len() >= 48);
|
||||
assert_eq!(u32::from_le_bytes(ready.payload[..4].try_into().unwrap()), 640);
|
||||
assert_eq!(&ready.payload[16..48], &program_sha256);
|
||||
session
|
||||
}
|
||||
fn command(&mut self, kind: u16, request: u64) -> Message {
|
||||
|
||||
Reference in New Issue
Block a user