[oe-commits] Paul Eggleton : oeqa/utils: make get_bb_var() more reliable

git at git.openembedded.org git at git.openembedded.org
Mon Dec 22 10:16:53 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 418cdf1ca37e06165ebaec86a0098d4750208539
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=418cdf1ca37e06165ebaec86a0098d4750208539

Author: Paul Eggleton <paul.eggleton at linux.intel.com>
Date:   Fri Dec 19 11:41:51 2014 +0000

oeqa/utils: make get_bb_var() more reliable

* Enable querying exported variables
* Use strip() to remove quotes so any internal quotes are not disturbed

Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/lib/oeqa/utils/commands.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 802bc2f..d29c1b1 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -138,9 +138,9 @@ def get_bb_var(var, target=None, postconfig=None):
     val = None
     bbenv = get_bb_env(target, postconfig=postconfig)
     for line in bbenv.splitlines():
-        if line.startswith(var + "="):
+        if line.startswith(var + "=") or line.startswith("export " + var + "="):
             val = line.split('=')[1]
-            val = val.replace('\"','')
+            val = val.strip('\"')
             break
     return val
 



More information about the Openembedded-commits mailing list