diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2019-04-18 21:57:17 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-04-25 00:05:20 +0100 |
commit | 3326a902dbccfa5f50afce132ded138b3253f7a8 (patch) | |
tree | 5178d6bfeccec5155ea6ac88807ed269392618cc /scripts/lib/resulttool/merge.py | |
parent | 0ab0dacc1afe3453f74b0bbc8b15229f93f1c61f (diff) | |
download | poky-3326a902dbccfa5f50afce132ded138b3253f7a8.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: 235bcf0c504e7ea253ccfb28d600898117c64c1f)
Signed-off-by: Joshua Watt <JPEWhacker@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.py | 8 |
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 | |||
17 | import resulttool.resultutils as resultutils | 17 | import resulttool.resultutils as resultutils |
18 | 18 | ||
19 | def merge(args, logger): | 19 | def 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 | ||
32 | def register_commands(subparsers): | 32 | def 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 | ||