]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/core/context.py: Add validation for run-tests option
authorAníbal Limón <anibal.limon@linux.intel.com>
Tue, 31 Jan 2017 21:05:53 +0000 (15:05 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 31 Jan 2017 23:27:43 +0000 (23:27 +0000)
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 <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/core/context.py

index efed4e6b048d8c7a29c4d7b8576b94ae25bade99..4476750a3c3b617d949919782ab5c96a0a35a83a 100644 (file)
@@ -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