Execute functional test jobs running under python3

Functional tests are executed by trovestack script, which uses python
in default OS version which is 2.7.

This change wraps python in tox and executes trovestack int_tests in
virtual enviroment, starting them in python3.

Any future python version change could be managed by tox framework.

Change-Id: I3a849978241d3d0669ef9e1c802ff504ac3c32cb
Signed-off-by: Marcin Piwowarczyk <m.piwowarczy@samsung.com>
This commit is contained in:
Marcin Piwowarczyk
2018-09-24 17:02:24 +02:00
parent 84e159eca9
commit e9cc6ca372
13 changed files with 50 additions and 30 deletions

View File

@@ -185,14 +185,14 @@ class MethodInspector(object):
def build_polling_task(retriever, condition=lambda value: value,
sleep_time=1, time_out=None):
sleep_time=1, time_out=0):
start_time = time.time()
def poll_and_check():
obj = retriever()
if condition(obj):
raise loopingcall.LoopingCallDone(retvalue=obj)
if time_out is not None and time.time() - start_time > time_out:
if time_out > 0 and time.time() - start_time > time_out:
raise exception.PollTimeOut
return loopingcall.BackOffLoopingCall(
@@ -202,7 +202,7 @@ def build_polling_task(retriever, condition=lambda value: value,
def poll_until(retriever, condition=lambda value: value,
sleep_time=1, time_out=None):
sleep_time=1, time_out=0):
"""Retrieves object until it passes condition, then returns it.
If time_out_limit is passed in, PollTimeOut will be raised once that