diff options
Diffstat (limited to 'meta/lib/oeqa/utils')
-rw-r--r-- | meta/lib/oeqa/utils/commands.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index f7f8c16bf0..8059cbce3e 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py | |||
@@ -167,7 +167,7 @@ class Result(object): | |||
167 | pass | 167 | pass |
168 | 168 | ||
169 | 169 | ||
170 | def runCmd(command, ignore_status=False, timeout=None, assert_error=True, | 170 | def runCmd(command, ignore_status=False, timeout=None, assert_error=True, sync=True, |
171 | native_sysroot=None, limit_exc_output=0, output_log=None, **options): | 171 | native_sysroot=None, limit_exc_output=0, output_log=None, **options): |
172 | result = Result() | 172 | result = Result() |
173 | 173 | ||
@@ -184,6 +184,12 @@ def runCmd(command, ignore_status=False, timeout=None, assert_error=True, | |||
184 | cmd = Command(command, timeout=timeout, output_log=output_log, **options) | 184 | cmd = Command(command, timeout=timeout, output_log=output_log, **options) |
185 | cmd.run() | 185 | cmd.run() |
186 | 186 | ||
187 | # tests can be heavy on IO and if bitbake can't write out its caches, we see timeouts. | ||
188 | # call sync around the tests to ensure the IO queue doesn't get too large, taking any IO | ||
189 | # hit here rather than in bitbake shutdown. | ||
190 | if sync: | ||
191 | os.system("sync") | ||
192 | |||
187 | result.command = command | 193 | result.command = command |
188 | result.status = cmd.status | 194 | result.status = cmd.status |
189 | result.output = cmd.output | 195 | result.output = cmd.output |