(*--------------------------------------------------------------------------- Copyright (c) 2025 Thomas Gazagnaire. All rights reserved. SPDX-License-Identifier: ISC ---------------------------------------------------------------------------*) (** SpaceOS E2E test harness — types and reporting. Pure logic for result tracking and report formatting. The actual E2E steps (build, run, assert) live in the CLI binary. *) (** {1 Configuration} *) type config = { build_file : string option; run_file : string option; kernel : string option; output : string option; min_frames : int; timeout : float; } (** E2E test configuration. *) val default_config : config (** Default configuration: 10 frames, 60s timeout. *) (** {1 Step results} *) type step_result = | Pass of string | Fail of string (** Result of a single E2E step. *) val is_pass : step_result -> bool (** [is_pass r] is [true] if [r] is [Pass _]. *) val pp_result : Format.formatter -> step_result -> unit (** [pp_result ppf r] prints [r] as [PASS msg] or [FAIL msg]. *) (** {1 Reporting} *) val exit_code : step_result list -> int (** [exit_code results] is [0] if all results are [Pass], [1] otherwise. *) val report : step_result list -> int (** [report results] prints a summary to stdout and returns {!exit_code}. *) (** {1 Assertions} *) val check_frames : received:int -> target:int -> step_result (** [check_frames ~received ~target] is [Pass] if [received >= target]. *) val check_exit_code : int -> step_result (** [check_exit_code n] is [Pass] if [n = 0]. *)