selftest/commands: extend variable regex to include A_B variable notation

This change allows quering for variables with the format A_B, i.e.
PREFERRED_PROVIDER_virtual/kernel instead of just A.

(From OE-Core rev: 3810738eff6bdcf27c7e291dbeaedc699ab14bfc)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Leonardo Sandoval 2017-04-04 09:45:46 -07:00 committed by Richard Purdie
parent 37cfcd2cca
commit b84671102e
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ def get_bb_vars(variables=None, target=None, postconfig=None):
if variables is not None:
variables = variables.copy()
var_re = re.compile(r'^(export )?(?P<var>\w+)="(?P<value>.*)"$')
var_re = re.compile(r'^(export )?(?P<var>\w+(_.*)?)="(?P<value>.*)"$')
unset_re = re.compile(r'^unset (?P<var>\w+)$')
lastline = None
values = {}