summaryrefslogtreecommitdiffstats
path: root/scripts/lib/resulttool/merge.py
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2019-04-18 21:57:17 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-12 09:13:38 +0100
commit2a81631d563015905915b8c6fff4729f74369896 (patch)
treeb12639e83325f6bf89953331f01319ae0da316b1 /scripts/lib/resulttool/merge.py
parent1670d355cb84055375019af7997cb8c0184d3592 (diff)
downloadpoky-2a81631d563015905915b8c6fff4729f74369896.tar.gz
resulttool: Load results from URL
Adds support for resulttool to load JSON files directly from a http:// or https:// URL (From OE-Core rev: 8e2f0257e1e438b88e4298438d5bae5f7c3c0a7a) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/resulttool/merge.py')
-rw-r--r--scripts/lib/resulttool/merge.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/lib/resulttool/merge.py b/scripts/lib/resulttool/merge.py
index 3e4b7a38ad..7159463f6e 100644
--- a/scripts/lib/resulttool/merge.py
+++ b/scripts/lib/resulttool/merge.py
@@ -17,7 +17,7 @@ import json
17import resulttool.resultutils as resultutils 17import resulttool.resultutils as resultutils
18 18
19def merge(args, logger): 19def merge(args, logger):
20 if os.path.isdir(args.target_results): 20 if resultutils.is_url(args.target_results) or os.path.isdir(args.target_results):
21 results = resultutils.load_resultsdata(args.target_results, configmap=resultutils.store_map) 21 results = resultutils.load_resultsdata(args.target_results, configmap=resultutils.store_map)
22 resultutils.append_resultsdata(results, args.base_results, configmap=resultutils.store_map) 22 resultutils.append_resultsdata(results, args.base_results, configmap=resultutils.store_map)
23 resultutils.save_resultsdata(results, args.target_results) 23 resultutils.save_resultsdata(results, args.target_results)
@@ -31,12 +31,12 @@ def merge(args, logger):
31 31
32def register_commands(subparsers): 32def register_commands(subparsers):
33 """Register subcommands from this plugin""" 33 """Register subcommands from this plugin"""
34 parser_build = subparsers.add_parser('merge', help='merge test result files/directories', 34 parser_build = subparsers.add_parser('merge', help='merge test result files/directories/URLs',
35 description='merge the results from multiple files/directories into the target file or directory', 35 description='merge the results from multiple files/directories/URLs into the target file or directory',
36 group='setup') 36 group='setup')
37 parser_build.set_defaults(func=merge) 37 parser_build.set_defaults(func=merge)
38 parser_build.add_argument('base_results', 38 parser_build.add_argument('base_results',
39 help='the results file/directory to import') 39 help='the results file/directory/URL to import')
40 parser_build.add_argument('target_results', 40 parser_build.add_argument('target_results',
41 help='the target file or directory to merge the base_results with') 41 help='the target file or directory to merge the base_results with')
42 42