All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 3/5] oeqa/selftest/context: write testresult to json files
Date: Mon, 15 Oct 2018 15:24:52 +0800	[thread overview]
Message-ID: <1539588294-5532-3-git-send-email-ee.peng.yeoh@intel.com> (raw)
In-Reply-To: <1539588294-5532-1-git-send-email-ee.peng.yeoh@intel.com>

As part of the solution to replace Testopia to store testresult,
OEQA selftest need to output testresult into json files, where
these json testresult files will be stored into git repository
by the future test-case-management tools.

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
---
 meta/lib/oeqa/selftest/context.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py
index c78947e..7a72f17 100644
--- a/meta/lib/oeqa/selftest/context.py
+++ b/meta/lib/oeqa/selftest/context.py
@@ -73,7 +73,7 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
 
         parser.add_argument('--machine', required=False, choices=['random', 'all'],
                             help='Run tests on different machines (random/all).')
-        
+
         parser.set_defaults(func=self.run)
 
     def _get_available_machines(self):
@@ -99,8 +99,8 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
         return cases_paths
 
     def _process_args(self, logger, args):
-        args.output_log = '%s-results-%s.log' % (self.name,
-                time.strftime("%Y%m%d%H%M%S"))
+        args.test_start_time = time.strftime("%Y%m%d%H%M%S")
+        args.output_log = '%s-results-%s.log' % (self.name, args.test_start_time)
         args.test_data_file = None
         args.CASES_PATHS = None
 
@@ -220,7 +220,10 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
         else:
             self._pre_run()
             rc = self.tc.runTests(**self.tc_kwargs['run'])
-            rc.logDetails()
+            json_result_dir = os.path.join(os.path.dirname(os.path.abspath(args.output_log)),
+                                           'json_testresults-%s' % args.test_start_time,
+                                           'oe-selftest')
+            rc.logDetails(json_result_dir)
             rc.logSummary(self.name)
 
         return rc
-- 
2.7.4



  parent reply	other threads:[~2018-10-15  7:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-15  7:24 [PATCH 1/5] oeqa/core/runner: refactor for OEQA to write json testresult Yeoh Ee Peng
2018-10-15  7:24 ` [PATCH 2/5] oeqa/core/runner: write testresult to json files Yeoh Ee Peng
2018-10-15  8:53   ` Richard Purdie
2018-10-15 10:20     ` Yeoh, Ee Peng
2018-10-18  9:47     ` Yeoh, Ee Peng
2018-10-18 21:56       ` richard.purdie
2018-10-20  1:50         ` Yeoh, Ee Peng
2018-10-22  7:23         ` Yeoh, Ee Peng
2018-10-22  8:17         ` Yeoh, Ee Peng
2018-10-22  8:52           ` richard.purdie
2018-10-15  7:24 ` Yeoh Ee Peng [this message]
2018-10-15  7:24 ` [PATCH 4/5] testimage.bbclass: " Yeoh Ee Peng
2018-10-15  7:24 ` [PATCH 5/5] testsdk.bbclass: " Yeoh Ee Peng
2018-10-15  8:25 ` [PATCH 1/5] oeqa/core/runner: refactor for OEQA to write json testresult Richard Purdie
2018-10-15  8:47   ` Yeoh, Ee Peng
2018-10-18  9:11 Yeoh Ee Peng
2018-10-18  9:11 ` [PATCH 3/5] oeqa/selftest/context: write testresult to json files Yeoh Ee Peng

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=1539588294-5532-3-git-send-email-ee.peng.yeoh@intel.com \
    --to=ee.peng.yeoh@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 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.