1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-16 15:57:04 +00:00

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>
This commit is contained in:
Joshua Watt
2019-04-18 21:57:17 -05:00
committed by Richard Purdie
parent 0ab0dacc1a
commit 3326a902db
5 changed files with 28 additions and 13 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ def store(args, logger):
try:
results = {}
logger.info('Reading files from %s' % args.source)
if os.path.isfile(args.source):
if resultutils.is_url(args.source) or os.path.isfile(args.source):
resultutils.append_resultsdata(results, args.source)
else:
for root, dirs, files in os.walk(args.source):
@@ -92,7 +92,7 @@ def register_commands(subparsers):
group='setup')
parser_build.set_defaults(func=store)
parser_build.add_argument('source',
help='source file or directory that contain the test result files to be stored')
help='source file/directory/URL that contain the test result files to be stored')
parser_build.add_argument('git_dir',
help='the location of the git repository to store the results in')
parser_build.add_argument('-a', '--all', action='store_true',