Struct deqp_runner::piglit_command::PiglitCommand
source · pub struct PiglitCommand {
pub config: TestConfiguration,
pub piglit_folder: PathBuf,
pub prefix: String,
}
Fields§
§config: TestConfiguration
§piglit_folder: PathBuf
§prefix: String
Trait Implementations§
source§impl SingleBinaryTestCommand for PiglitCommand
impl SingleBinaryTestCommand for PiglitCommand
source§fn current_test<'a>(&self, tests: &'a [&TestCase]) -> &'a BinaryTest
fn current_test<'a>(&self, tests: &'a [&TestCase]) -> &'a BinaryTest
Sanity-checks and returns the BinaryTest that the test list contains.
source§impl SingleTestCommand for PiglitCommand
impl SingleTestCommand for PiglitCommand
fn test_groups<'d>(
&'d self,
sub_config: &SubRunConfig,
filters: &[String],
tests: Vec<TestCase>
) -> Result<Vec<(&'d dyn TestCommand, Vec<TestCase>)>>where
Self: Sized,
source§impl TestCommand for PiglitCommand
impl TestCommand for PiglitCommand
source§fn name(&self) -> &str
fn name(&self) -> &str
Must be implemented, returns the name of this TestCommand for logging errors.
fn prepare( &self, _caselist_state: &CaselistState, tests: &[&TestCase] ) -> Result<Command>
source§fn clean(
&self,
_caselist_state: &CaselistState,
tests: &[&TestCase],
_results: &[RunnerResult]
) -> Result<()>
fn clean( &self, _caselist_state: &CaselistState, tests: &[&TestCase], _results: &[RunnerResult] ) -> Result<()>
Hook for cleaning up anything necessary after running a test binary
(like removing logs that shouldn’t be saved for all the passing tests).
source§fn parse_results(
&self,
_caselist_state: &CaselistState,
tests: &[&TestCase],
stdout: TimeoutChildStdout<'_>,
timer: Option<Timer>,
fail_counter: Option<FailCounter>
) -> Result<CaselistResult>
fn parse_results( &self, _caselist_state: &CaselistState, tests: &[&TestCase], stdout: TimeoutChildStdout<'_>, timer: Option<Timer>, fail_counter: Option<FailCounter> ) -> Result<CaselistResult>
Invokes the test suite’s result parser on stdout.
source§fn should_save_log(
&self,
_caselist_state: &CaselistState,
tests: &[&TestCase]
) -> bool
fn should_save_log( &self, _caselist_state: &CaselistState, tests: &[&TestCase] ) -> bool
Overrideable hook for whether a log should be always be saved. Sometimes
there’s a test that collects general implementation details (API
version, extensions) that might be useful for the user to always have,
for sanity-checking that the run tested what they intended.
fn log_path( &self, _caselist_state: &CaselistState, tests: &[&TestCase] ) -> Result<PathBuf>
source§fn see_more(&self, test_name: &str, _caselist_state: &CaselistState) -> String
fn see_more(&self, test_name: &str, _caselist_state: &CaselistState) -> String
Optional (recommended) hook for logging on failure to point the user to
more information about a specific failure (caselist, log file, etc).
source§fn config(&self) -> &TestConfiguration
fn config(&self) -> &TestConfiguration
Must be implemented, returns the shared test configuration for this TestCommand.
fn skips(&self) -> &RegexSet
fn flakes(&self) -> &RegexSet
fn baseline(&self) -> &RunnerResults
fn baseline_status(&self, test: &str) -> Option<RunnerStatus>
fn translate_result( &self, result: &TestResult, caselist_state: &CaselistState ) -> RunnerStatus
fn skip_test(&self, test: &str) -> bool
source§fn handle_result(
&self,
_caselist_state: &CaselistState,
_result: &TestResult,
_status: &RunnerStatus
) -> Result<()>
fn handle_result( &self, _caselist_state: &CaselistState, _result: &TestResult, _status: &RunnerStatus ) -> Result<()>
Used for doing any extra logging that might need to be done for failed tests.
source§fn handle_exit_status(
&self,
code: Option<i32>,
some_result: Option<&mut TestResult>
)
fn handle_exit_status( &self, code: Option<i32>, some_result: Option<&mut TestResult> )
By default, sets the last test result with Crash if the binary crashed
after emitting test results. Can also be overridden if the exit status
is what determines test success/failure.
source§fn run(
&self,
caselist_state: &CaselistState,
tests: &[&TestCase],
fail_counter: Option<FailCounter>
) -> Result<Vec<RunnerResult>>
fn run( &self, caselist_state: &CaselistState, tests: &[&TestCase], fail_counter: Option<FailCounter> ) -> Result<Vec<RunnerResult>>
Invokes the test command on a list of testcases. This is common code
because of the trickiness in handling timeouts, whether logs should be
saved, etc.
source§fn run_caselist_and_flake_detect(
&self,
caselist: &[TestCase],
caselist_state: &mut CaselistState,
fail_counter: Option<FailCounter>
) -> Result<Vec<RunnerResult>>
fn run_caselist_and_flake_detect( &self, caselist: &[TestCase], caselist_state: &mut CaselistState, fail_counter: Option<FailCounter> ) -> Result<Vec<RunnerResult>>
Loop invoking the list of cases, where we run again to check if it was
just a flake if an unexpected result occurs.
fn process_caselist( &self, tests: Vec<TestCase>, caselist_id: u32, total_failures: Arc<AtomicUsize> ) -> Result<Vec<RunnerResult>>
fn split_tests_to_groups(
&self,
tests: Vec<TestCase>,
tests_per_group: usize,
min_tests_per_group: usize,
sub_config: &SubRunConfig,
include_filters: &[RegexSet]
) -> Result<Vec<(&dyn TestCommand, Vec<TestCase>)>>where
Self: Sized,
fn caselist_file_path( &self, caselist_state: &CaselistState, suffix: &str ) -> Result<PathBuf>
Auto Trait Implementations§
impl Freeze for PiglitCommand
impl RefUnwindSafe for PiglitCommand
impl Send for PiglitCommand
impl Sync for PiglitCommand
impl Unpin for PiglitCommand
impl UnwindSafe for PiglitCommand
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more