research/fraginternals: Test: adding pre_delay

pre_delay can be used to add a delay before actually executing the test.

Suggested-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
This commit is contained in:
Angelo Compagnucci 2021-10-07 10:53:51 +02:00 committed by Mathy Vanhoef
parent 568d566478
commit 33b49cbad3

View File

@ -202,6 +202,7 @@ class Test(metaclass=abc.ABCMeta):
def __init__(self, actions=None): def __init__(self, actions=None):
self.actions = actions if actions != None else [] self.actions = actions if actions != None else []
self.generated = False self.generated = False
self.pre_delay = None
self.delay = None self.delay = None
self.inc_pn = None self.inc_pn = None
self.check_fn = None self.check_fn = None
@ -268,7 +269,8 @@ class Test(metaclass=abc.ABCMeta):
return False return False
return self.check_fn(p) return self.check_fn(p)
def set_general_options(self, delay=None, inc_pn=None): def set_general_options(self, delay=None, inc_pn=None, pre_delay=None):
self.pre_delay = pre_delay
self.delay = delay self.delay = delay
self.inc_pn = inc_pn self.inc_pn = inc_pn