aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-27 06:44:01 -1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-28 13:30:40 +0100
commit41bf1fa85a540232dcf92fe473c3b3c4cd7259dd (patch)
treeb6174daecb56c27a82bcbcf99fe15383481644cd /lib
parentd388f6d159b9d7e1ed3f199f2d1aca0c473cda6d (diff)
downloadbitbake-contrib-41bf1fa85a540232dcf92fe473c3b3c4cd7259dd.tar.gz
tinfoil: Allow run_command not to wait on events
There are some commands where we want to see the events returned so allow the caller to request this. This also allows us to fix an infamous bug in the tinfoil testsuite in OE-Core. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0e8421c41d97d5d50a553d70c8f775d521f1a199) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/tinfoil.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/tinfoil.py b/lib/bb/tinfoil.py
index ae6903895..28f1e5623 100644
--- a/lib/bb/tinfoil.py
+++ b/lib/bb/tinfoil.py
@@ -448,7 +448,7 @@ class Tinfoil:
self.run_actions(config_params)
self.recipes_parsed = True
- def run_command(self, command, *params):
+ def run_command(self, command, *params, handle_events=True):
"""
Run a command on the server (as implemented in bb.command).
Note that there are two types of command - synchronous and
@@ -468,7 +468,7 @@ class Tinfoil:
try:
result = self.server_connection.connection.runCommand(commandline)
finally:
- while True:
+ while handle_events:
event = self.wait_event()
if not event:
break