Skip to content

Commit

Permalink
Keep the value when having multiple runs
Browse files Browse the repository at this point in the history
  • Loading branch information
tbarbette committed Jun 28, 2024
1 parent 8614a90 commit 47bda86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions npf/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,9 @@ def execute(self, build, run, v, n_runs=1, n_retry=0, allowed_types=SectionScrip
all_pyexits_v.append(vlist)

if len(all_pyexits) >0 and allowed_types != set([SectionScript.TYPE_INIT]):
vs = {'RESULTS': new_data_results, 'TIME_RESULTS': new_kind_results["time"], 'KIND_RESULTS':new_kind_results}
vs = {'RESULTS': new_data_results,
'TIME_RESULTS': new_kind_results["time"], #Deprecated
'KIND_RESULTS': new_kind_results}
vs.update(v)

for late_variables in self.get_late_variables():
Expand All @@ -945,8 +947,8 @@ def execute(self, build, run, v, n_runs=1, n_retry=0, allowed_types=SectionScrip
try:
for p,v in zip(all_pyexits, all_pyexits_v):
print("Executing PyExit script", p.name)
v.update(vs)
exec(p.content, v)
exec(p.content, vs)

except SystemExit as e:
if e.code != 0:
print("ERROR WHILE EXECUTING PYEXIT SCRIPT: returned code %d" % e.code)
Expand Down
2 changes: 1 addition & 1 deletion npf_watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def mail_results(self, repo: Repository, build: Build, tests: List[Test], datase
body=body,
bodytype='html', images=graphs)

def run(self,options):
def run(self, options):
terminate = False
while not terminate:
for repo, tests in self.repo_list:
Expand Down

0 comments on commit 47bda86

Please sign in to comment.