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
vkarak committed Nov 13, 2024
1 parent e68d953 commit a294958
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions reframe/frontend/reporting/__init__.py
Original file line number Diff line number Diff line change
@@ -17,7 +17,6 @@
import uuid
from collections import UserDict
from collections.abc import Hashable
from filelock import FileLock

import reframe as rfm
import reframe.utility.jsonext as jsonext
@@ -419,7 +418,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:
@@ -446,15 +449,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.'''

0 comments on commit a294958

Please sign in to comment.