]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/utils: make get_bb_var() more reliable
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Fri, 19 Dec 2014 11:41:51 +0000 (11:41 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 21 Dec 2014 17:30:52 +0000 (17:30 +0000)
* Enable querying exported variables
* Use strip() to remove quotes so any internal quotes are not disturbed

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/commands.py

index 802bc2f208bf1c835afb3e1c7ff405b4f855e976..d29c1b1a68aa92973e677f112fdb36f17cc018f9 100644 (file)
@@ -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