sleeptest: Modify to make use of self.params/multiplex file

Modify sleeptest to pick any params from self.params.
Also, introduce a sample multiplex file, sleeptest.mplx,
an example of how to write a multiplex file to fulfill
matrix defining goals.
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 159817c4
variants:
- sleeptest:
variants:
- short:
sleep_length = 0.5
- medium:
sleep_length = 1
- long:
sleep_length = 5
......@@ -27,10 +27,11 @@ class sleeptest(test.Test):
Example test for avocado.
"""
def action(self, length=1):
def action(self):
"""
Sleep for length seconds.
"""
length = float(self.params.get('sleep_length', 1))
self.log.debug("Sleeping for %d seconds", length)
time.sleep(length)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册