[oe-commits] [openembedded-core] 01/10: meta: introduce a small baserunner framework
git at git.openembedded.org
git at git.openembedded.org
Thu Sep 15 11:20:24 UTC 2016
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 9f912cd75f4d989880f4a329c42422738739ab83
Author: zjh <junhuix.zhang at intel.com>
AuthorDate: Tue Sep 13 09:17:32 2016 +0800
meta: introduce a small baserunner framework
Signed-off-by: zjh <junhuix.zhang at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/base/baserunner.py | 60 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/meta/lib/base/baserunner.py b/meta/lib/base/baserunner.py
new file mode 100755
index 0000000..56b838e
--- /dev/null
+++ b/meta/lib/base/baserunner.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python
+# Copyright (C) 2013 Intel Corporation
+#
+# Released under the MIT license (see COPYING.MIT)
+
+# Base unittest module used by testrunner
+# This provides the common test runner functionalities including manifest input,
+# xunit output, timeout, tag filtering.
+
+"""Base testrunner"""
+
+from __future__ import absolute_import
+import os
+import sys
+import time
+import unittest
+import shutil
+
+class TestContext(object):
+ '''test context which inject into testcase'''
+ def __init__(self):
+ self.target = None
+
+class FakeOptions(object):
+ '''This class just use for configure's defualt arg.
+ Usually, we use this object in a non comandline environment.'''
+ timeout = 0
+ def __getattr__(self, name):
+ return None
+
+class TestRunnerBase(object):
+ '''test runner base '''
+ def __init__(self, context=None):
+ self.tclist = []
+ self.runner = None
+ self.context = context if context else TestContext()
+ self.test_result = None
+ self.run_time = None
+
+
+ def configure(self, options=FakeOptions()):
+ '''configure before testing'''
+ pass
+
+ def result(self):
+ '''output test result '''
+ pass
+
+ def loadtest(self, names=None):
+ '''load test suite'''
+ pass
+
+ def runtest(self, testsuite):
+ '''run test suite'''
+ pass
+
+ def start(self, testsuite):
+ '''start testing'''
+ pass
+
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list