google / openhtf

The open-source hardware testing framework.
Apache License 2.0
530 stars 217 forks source link

PhaseOptions(repeat_limit=None) does not repeat forever. #1160

Open dieser-niko opened 3 months ago

dieser-niko commented 3 months ago

The docstring for htf.PhaseOption says:

repeat_limit: Maximum number of repeats. None indicates a phase will be repeated infinitely as long as PhaseResult.REPEAT is returned.

But this doesn't seem to be the case. Doing exactly that only repeats the test 3 times and then fails.

Here's my test:

@htf.PhaseOptions(name="Repeat infinitely", timeout_s=200, repeat_limit=None)
def repeat(test: htf.TestApi, prompt: user_input.UserInput):
    print("hi")
    return htf.PhaseResult.REPEAT

I also run this test with test.execute(test_start=repeat) if that's relevant.