From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mail.openembedded.org (Postfix) with ESMTP id CB7C572925 for ; Fri, 19 Dec 2014 11:42:12 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 19 Dec 2014 03:42:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,606,1413270000"; d="scan'208";a="640244385" Received: from khamid-mobl1.ger.corp.intel.com (HELO peggleto-mobl5.ger.corp.intel.com) ([10.252.31.61]) by fmsmga001.fm.intel.com with ESMTP; 19 Dec 2014 03:42:13 -0800 From: Paul Eggleton To: openembedded-core@lists.openembedded.org Date: Fri, 19 Dec 2014 11:41:51 +0000 Message-Id: <3658e16962c9da4cfcd9b92497556cfda04ead40.1418984743.git.paul.eggleton@linux.intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: References: In-Reply-To: References: Subject: [PATCH 09/15] oeqa/utils: make get_bb_var() more reliable X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2014 11:42:13 -0000 * Enable querying exported variables * Use strip() to remove quotes so any internal quotes are not disturbed Signed-off-by: Paul Eggleton --- 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 -- 1.9.3