Skip to content

Commit

Permalink
Do not use file locks when saving the report file
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarak committed Nov 13, 2024
1 parent e68d953 commit f887069
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions reframe/frontend/reporting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,11 @@ def update_run_stats(self, stats):
'num_skipped': self.__report['runs'][-1]['num_skipped']
})

def _save(self, filename, compress, link_to_last):
def is_empty(self):
'''Return :obj:`True` is no test cases where run'''
return self.__report['session_info']['num_cases'] == 0

def save(self, filename, compress=False, link_to_last=True):
filename = _expand_report_filename(filename, newfile=True)
with open(filename, 'w') as fp:
if compress:
Expand All @@ -446,15 +450,6 @@ def _save(self, filename, compress, link_to_last):
else:
raise ReframeError('path exists and is not a symlink')

def is_empty(self):
'''Return :obj:`True` is no test cases where run'''
return self.__report['session_info']['num_cases'] == 0

def save(self, filename, compress=False, link_to_last=True):
prefix = os.path.dirname(filename) or '.'
with FileLock(os.path.join(prefix, '.report.lock')):
self._save(filename, compress, link_to_last)

def store(self):
'''Store the report in the results storage.'''

Expand Down

0 comments on commit f887069

Please sign in to comment.