[oe-commits] [openembedded-core] branch master-next updated: resulttool: Add option to dump all ptest logs

git at git.openembedded.org git at git.openembedded.org
Sat May 4 09:47:02 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

The following commit(s) were added to refs/heads/master-next by this push:
     new 0bff5b3  resulttool: Add option to dump all ptest logs
0bff5b3 is described below

commit 0bff5b33df8f87fd43ab6fb2b2e3d85ee2fb11e1
Author: Joshua Watt <jpewhacker at gmail.com>
AuthorDate: Fri May 3 22:17:52 2019 -0500

    resulttool: Add option to dump all ptest logs
    
    Adds an option to dump all the ptest logs to individual files to a
    specified directory.
    
    [YOCTO #13331]
    
    Signed-off-by: Joshua Watt <JPEWhacker at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/lib/resulttool/log.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/scripts/lib/resulttool/log.py b/scripts/lib/resulttool/log.py
index 5584f2d..1883040 100644
--- a/scripts/lib/resulttool/log.py
+++ b/scripts/lib/resulttool/log.py
@@ -30,6 +30,15 @@ def log(args, logger):
                 continue
             r = results[path][res]['result']
 
+            if args.dump_ptest:
+                if 'ptestresult.sections' in r:
+                    for name, ptest in r['ptestresult.sections'].items():
+                        if 'log' in ptest:
+                            dest = os.path.join(args.dump_ptest, '%s.log' % name)
+                            print(dest)
+                            with open(dest, 'w') as f:
+                                f.write(ptest['log'])
+
             if args.raw:
                 if 'ptestresult.rawlogs' in r:
                     print(r['ptestresult.rawlogs']['log'])
@@ -51,6 +60,8 @@ def register_commands(subparsers):
             help='the results file/directory/URL to import')
     parser.add_argument('--ptest', action='append', default=[],
             help='show logs for a ptest')
+    parser.add_argument('--dump-ptest', metavar='DIR',
+            help='Dump all ptest log files to the specified directory.')
     parser.add_argument('--raw', action='store_true',
             help='show raw logs')
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list