diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-21 17:49:25 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-22 07:45:17 +0100 |
commit | 7e6514b28b71f86fa911338e31ec4b284eb8fe46 (patch) | |
tree | 39252ae53c371cc47bc9ba1da1f412f7d19bbdbd /meta/lib/oeqa/utils/commands.py | |
parent | fbaa7da33b497088aa352f6cb8dbc02327310cd6 (diff) | |
download | poky-7e6514b28b71f86fa911338e31ec4b284eb8fe46.tar.gz |
oeqa: Streamline oe-selftest startup time
"bitbake -e" executions from get_bb_var calls are slow and slow down oe-selftest
startup. Rationalise the code to avoid them and minimise the number of "parsing"
locations we use by caching key variables and passing them around more.
This was particularly problematic with oe-selftest -j usage since it would
have multiple bitbake -e executions per process making parallel usage
particularly slow.
(From OE-Core rev: 3689cadeb07d76e66f97d890e844f899f69666fe)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils/commands.py')
-rw-r--r-- | meta/lib/oeqa/utils/commands.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index c1f533802e..575e380017 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py | |||
@@ -285,8 +285,10 @@ def get_bb_vars(variables=None, target=None, postconfig=None): | |||
285 | def get_bb_var(var, target=None, postconfig=None): | 285 | def get_bb_var(var, target=None, postconfig=None): |
286 | return get_bb_vars([var], target, postconfig)[var] | 286 | return get_bb_vars([var], target, postconfig)[var] |
287 | 287 | ||
288 | def get_test_layer(): | 288 | def get_test_layer(bblayers=None): |
289 | layers = get_bb_var("BBLAYERS").split() | 289 | if bblayers is None: |
290 | bblayers = get_bb_var("BBLAYERS") | ||
291 | layers = bblayers.split() | ||
290 | testlayer = None | 292 | testlayer = None |
291 | for l in layers: | 293 | for l in layers: |
292 | if '~' in l: | 294 | if '~' in l: |