public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: jwang <jing.j.wang@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/4] meta: introduce a small baserunner framework
Date: Tue, 13 Sep 2016 09:17:32 +0800	[thread overview]
Message-ID: <1473729455-32649-1-git-send-email-jing.j.wang@intel.com> (raw)

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



             reply	other threads:[~2016-09-13  1:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13  1:17 jwang [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1473729455-32649-1-git-send-email-jing.j.wang@intel.com \
    --to=jing.j.wang@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox