def _do_make_check(sleep_time, poll_fail=None): nonlocal test_id test = test_util.make_check(SleepCheck, sleep_time=sleep_time, poll_fail=poll_fail, alt_name=f'SleepCheck_{test_id}') test_id += 1 return test
def test_pass_in_retries(make_runner, make_cases, tmp_path, common_exec_ctx): tmpfile = tmp_path / 'out.txt' tmpfile.write_text('0\n') runner = make_runner(max_retries=3) runner.runall( make_cases([ test_util.make_check(RetriesCheck, filename=str(tmpfile), num_runs=2) ])) # Ensure that the test passed after retries in run `pass_run_no` assert 1 == runner.stats.num_cases() assert_runall(runner) assert 1 == len(runner.stats.failed(run=0)) assert 2 == rt.runtime().current_run assert 0 == len(runner.stats.failed())
def make_test(name): return test_util.make_check(rfm.RegressionTest, alt_name=name, valid_systems=['*'], valid_prog_environs=['*'])
def make_case(*args, **kwargs): test = test_util.make_check(*args, **kwargs) return executors.TestCase(test, None, None)
def make_kbd_check(phase='wait'): return test_util.make_check(KeyboardInterruptCheck, phase=phase)