From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mail.openembedded.org (Postfix) with ESMTP id A456876536 for ; Tue, 31 Jan 2017 21:02:52 +0000 (UTC) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP; 31 Jan 2017 13:02:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,316,1477983600"; d="scan'208";a="60333972" Received: from alimonb-mobl1.zpn.intel.com ([10.219.128.122]) by fmsmga006.fm.intel.com with ESMTP; 31 Jan 2017 13:02:52 -0800 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= To: openembedded-core@lists.openembedded.org Date: Tue, 31 Jan 2017 15:05:53 -0600 Message-Id: <1485896754-13589-3-git-send-email-anibal.limon@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1485896754-13589-1-git-send-email-anibal.limon@linux.intel.com> References: <1485896754-13589-1-git-send-email-anibal.limon@linux.intel.com> MIME-Version: 1.0 Subject: [PATCHv2 3/4] oeqa/core/context.py: Add validation for run-tests option 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: Tue, 31 Jan 2017 21:02:53 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The run-tests option is optional so if isn't specified set to None instead of crash on split(). Signed-off-by: Aníbal Limón --- meta/lib/oeqa/core/context.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py index efed4e6..4476750 100644 --- a/meta/lib/oeqa/core/context.py +++ b/meta/lib/oeqa/core/context.py @@ -215,7 +215,11 @@ class OETestContextExecutor(object): else: self.tc_kwargs['init']['td'] = {} - self.tc_kwargs['load']['modules'] = args.run_tests.split() + + if args.run_tests: + self.tc_kwargs['load']['modules'] = args.run_tests.split() + else: + self.tc_kwargs['load']['modules'] = None self.module_paths = args.CASES_PATHS -- 2.1.4