summaryrefslogtreecommitdiffstats
path: root/scripts/lib/resulttool/store.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/store.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/store.py')
-rw-r--r--scripts/lib/resulttool/store.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/lib/resulttool/store.py b/scripts/lib/resulttool/store.py
index e4a0807528..acdfbd94fd 100644
--- a/scripts/lib/resulttool/store.py
+++ b/scripts/lib/resulttool/store.py
@@ -29,7 +29,7 @@ def store(args, logger):
29 try: 29 try:
30 results = {} 30 results = {}
31 logger.info('Reading files from %s' % args.source) 31 logger.info('Reading files from %s' % args.source)
32 if os.path.isfile(args.source): 32 if resultutils.is_url(args.source) or os.path.isfile(args.source):
33 resultutils.append_resultsdata(results, args.source) 33 resultutils.append_resultsdata(results, args.source)
34 else: 34 else:
35 for root, dirs, files in os.walk(args.source): 35 for root, dirs, files in os.walk(args.source):
@@ -92,7 +92,7 @@ def register_commands(subparsers):
92 group='setup') 92 group='setup')
93 parser_build.set_defaults(func=store) 93 parser_build.set_defaults(func=store)
94 parser_build.add_argument('source', 94 parser_build.add_argument('source',
95 help='source file or directory that contain the test result files to be stored') 95 help='source file/directory/URL that contain the test result files to be stored')
96 parser_build.add_argument('git_dir', 96 parser_build.add_argument('git_dir',
97 help='the location of the git repository to store the results in') 97 help='the location of the git repository to store the results in')
98 parser_build.add_argument('-a', '--all', action='store_true', 98 parser_build.add_argument('-a', '--all', action='store_true',