Browse Source

oeqa/core/context.py: Add validation for run-tests option

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>
Aníbal Limón 7 years ago
parent
commit
877732406c
1 changed files with 5 additions and 1 deletions
  1. 5 1
      meta/lib/oeqa/core/context.py

+ 5 - 1
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