All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] meta: introduce a small baserunner framework
@ 2016-09-13  1:17 jwang
  2016-09-13  1:17 ` [PATCH 2/4] meta: implement key baserunner features jwang
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: jwang @ 2016-09-13  1:17 UTC (permalink / raw)
  To: openembedded-core

From: zjh <junhuix.zhang@intel.com>

Signed-off-by: zjh <junhuix.zhang@intel.com>
---
 meta/lib/base/baserunner.py | 60 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100755 meta/lib/base/baserunner.py

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
+
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-09-15 13:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-13  1:17 [PATCH 1/4] meta: introduce a small baserunner framework jwang
2016-09-13  1:17 ` [PATCH 2/4] meta: implement key baserunner features jwang
2016-09-15 13:15   ` Joshua Lock
2016-09-13  1:17 ` [PATCH 3/4] meta: use baserunner in oetest jwang
2016-09-15 13:15   ` Joshua Lock
2016-09-13  1:17 ` [PATCH 4/4] meta: modify runexported script to inherit the features from baserunner jwang
2016-09-15 13:15 ` [PATCH 1/4] meta: introduce a small baserunner framework Joshua Lock

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.