@@ -10,6 +10,7 @@
import logging
import os
import sys
+import time
import atexit
import re
from collections import OrderedDict, defaultdict
@@ -729,6 +730,7 @@ class Tinfoil:
ret = self.run_command('buildTargets', targets, task)
if handle_events:
+ lastevent = time.time()
result = False
# Borrowed from knotty, instead somewhat hackily we use the helper
# as the object to store "shutdown" on
@@ -741,6 +743,7 @@ class Tinfoil:
try:
event = self.wait_event(0.25)
if event:
+ lastevent = time.time()
if event_callback and event_callback(event):
continue
if helper.eventHandler(event):
@@ -785,10 +788,13 @@ class Tinfoil:
self.logger.error(str(event))
result = False
break
-
elif helper.shutdown > 1:
break
termfilter.updateFooter()
+ if time.time() > (lastevent + (3*60)):
+ if not self.run_command('ping', handle_events=False):
+ print("\nUnable to ping server and no events, closing down...\n")
+ return False
except KeyboardInterrupt:
termfilter.clearFooter()
if helper.shutdown == 1:
If for some reason the bitbake server dies, we shouldn't loop indefinitely waiting for events within tinfoil. Add a ping test and exit if things have somehow failed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- lib/bb/tinfoil.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)