summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/resulttool/store.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/lib/resulttool/store.py b/scripts/lib/resulttool/store.py
index 06505aecc0..79c83dd8b7 100644
--- a/scripts/lib/resulttool/store.py
+++ b/scripts/lib/resulttool/store.py
@@ -21,16 +21,19 @@ import oeqa.utils.gitarchive as gitarchive
21def store(args, logger): 21def store(args, logger):
22 tempdir = tempfile.mkdtemp(prefix='testresults.') 22 tempdir = tempfile.mkdtemp(prefix='testresults.')
23 try: 23 try:
24 configvars = resultutils.extra_configvars.copy()
25 if args.executed_by:
26 configvars['EXECUTED_BY'] = args.executed_by
24 results = {} 27 results = {}
25 logger.info('Reading files from %s' % args.source) 28 logger.info('Reading files from %s' % args.source)
26 if resultutils.is_url(args.source) or os.path.isfile(args.source): 29 if resultutils.is_url(args.source) or os.path.isfile(args.source):
27 resultutils.append_resultsdata(results, args.source) 30 resultutils.append_resultsdata(results, args.source, configvars=configvars)
28 else: 31 else:
29 for root, dirs, files in os.walk(args.source): 32 for root, dirs, files in os.walk(args.source):
30 for name in files: 33 for name in files:
31 f = os.path.join(root, name) 34 f = os.path.join(root, name)
32 if name == "testresults.json": 35 if name == "testresults.json":
33 resultutils.append_resultsdata(results, f) 36 resultutils.append_resultsdata(results, f, configvars=configvars)
34 elif args.all: 37 elif args.all:
35 dst = f.replace(args.source, tempdir + "/") 38 dst = f.replace(args.source, tempdir + "/")
36 os.makedirs(os.path.dirname(dst), exist_ok=True) 39 os.makedirs(os.path.dirname(dst), exist_ok=True)
@@ -93,4 +96,6 @@ def register_commands(subparsers):
93 help='include all files, not just testresults.json files') 96 help='include all files, not just testresults.json files')
94 parser_build.add_argument('-e', '--allow-empty', action='store_true', 97 parser_build.add_argument('-e', '--allow-empty', action='store_true',
95 help='don\'t error if no results to store are found') 98 help='don\'t error if no results to store are found')
99 parser_build.add_argument('-x', '--executed-by', default='',
100 help='add executed-by configuration to each result file')
96 101