mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-29 01:35:06 +00:00
validate: launcher: Initialize Test start time outside of wait_process
wait_process will be moved to TestManager, so the values used to track process update must remain inside Test. Patch 2/4 to make TestManager handle waiting for processes instead of expecting each Test to do it.
This commit is contained in:
parent
498f7002f3
commit
bd4c221141
|
@ -192,9 +192,6 @@ class Test(Loggable):
|
||||||
return Result.NOT_RUN
|
return Result.NOT_RUN
|
||||||
|
|
||||||
def wait_process(self):
|
def wait_process(self):
|
||||||
self.last_val = 0
|
|
||||||
self.last_change_ts = time.time()
|
|
||||||
self.start_ts = time.time()
|
|
||||||
while True:
|
while True:
|
||||||
# Check process every second for timeout
|
# Check process every second for timeout
|
||||||
self.thread.join(1.0)
|
self.thread.join(1.0)
|
||||||
|
@ -305,6 +302,10 @@ class Test(Loggable):
|
||||||
self.thread = threading.Thread(target=self.thread_wrapper)
|
self.thread = threading.Thread(target=self.thread_wrapper)
|
||||||
self.thread.start()
|
self.thread.start()
|
||||||
|
|
||||||
|
self.last_val = 0
|
||||||
|
self.last_change_ts = time.time()
|
||||||
|
self.start_ts = time.time()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.wait_process()
|
self.wait_process()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
|
Loading…
Reference in a new issue