fix(simulation): stabilize PX4 readiness supervision
This commit is contained in:
@@ -212,6 +212,10 @@ def test_start_failure_and_profile_drift_fail_terminal(tmp_path: Path) -> None:
|
||||
)
|
||||
assert failed.state is RunState.FAILED
|
||||
assert failed.terminal_reason == "orchestrator-start-failed"
|
||||
assert any(
|
||||
event.payload.get("detail") == "RuntimeError: synthetic start failure"
|
||||
for event in service.store.list_events("run-s1b-001")
|
||||
)
|
||||
|
||||
store = QualificationRunStore(tmp_path / "drift")
|
||||
store.create(_run())
|
||||
@@ -343,11 +347,13 @@ def test_process_supervisor_rolls_back_partial_start(tmp_path: Path) -> None:
|
||||
@pytest.mark.skipif(os.name != "posix", reason="target supervisor is POSIX-only")
|
||||
def test_process_supervisor_waits_for_all_declared_ready_markers(tmp_path: Path) -> None:
|
||||
child = (
|
||||
"import signal,time;"
|
||||
"import signal,sys,time;"
|
||||
"signal.signal(signal.SIGINT,lambda *_:exit(0));"
|
||||
"print('provider booting',flush=True);"
|
||||
"time.sleep(0.05);"
|
||||
"print('transport connected',flush=True);"
|
||||
"sys.stdout.write('transport ');sys.stdout.flush();"
|
||||
"time.sleep(0.05);"
|
||||
"print('connected',flush=True);"
|
||||
"time.sleep(60)"
|
||||
)
|
||||
supervisor = PosixProcessSupervisor(tmp_path / "runtime")
|
||||
@@ -432,7 +438,10 @@ def test_stock_rover_profile_builds_exact_reviewed_provider_graph() -> None:
|
||||
)
|
||||
assert specs[0].ready_log_patterns == ("running...",)
|
||||
assert specs[1].argv[-2:] == ("px4_sitl", "gz_rover_ackermann")
|
||||
assert specs[1].ready_log_patterns[-1] == "Running, connected"
|
||||
assert specs[1].ready_log_patterns[-1] == (
|
||||
"successfully created rt/fmu/out/vehicle_status_v1 data writer"
|
||||
)
|
||||
assert specs[1].keep_stdin_open
|
||||
assert dict(specs[1].environment) == {
|
||||
"HEADLESS": "1",
|
||||
"PX4_SIM_SPEED_FACTOR": "1",
|
||||
|
||||
Reference in New Issue
Block a user