pub trait TestRunnerTrait: Send + Sync {
// Required methods
fn run_syntax_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TestResults>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn run_tests<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TestResults>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn run_build_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TestResults>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn name(&self) -> &str;
// Provided methods
fn run_lint<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TestResults>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn run_stage<'life0, 'async_trait>(
&'life0 self,
stage: VerifierStage,
) -> Pin<Box<dyn Future<Output = Result<TestResults>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
PSP-5: Language-agnostic test runner trait
Allows the orchestrator to run verification steps through any language’s toolchain without hardcoding Python paths.
Required Methods§
Sourcefn run_syntax_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TestResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run_syntax_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TestResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run syntax/type check (e.g., cargo check, uv run ty check .)
Sourcefn run_tests<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TestResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run_tests<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TestResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run the test suite (e.g., cargo test, uv run pytest)
Sourcefn run_build_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TestResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run_build_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TestResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run build check (e.g., cargo build)
Provided Methods§
Sourcefn run_lint<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TestResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run_lint<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TestResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run lint check (e.g., cargo clippy, uv run ruff check .)
Default: returns a no-op pass for plugins without a lint stage.
Sourcefn run_stage<'life0, 'async_trait>(
&'life0 self,
stage: VerifierStage,
) -> Pin<Box<dyn Future<Output = Result<TestResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run_stage<'life0, 'async_trait>(
&'life0 self,
stage: VerifierStage,
) -> Pin<Box<dyn Future<Output = Result<TestResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run a specific verifier stage by enum variant.
Dispatches to the appropriate method. Convenience for generic callers.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".