Sometimes, when kernel is crashed during the tests, empty tests_resume.json file remains.
Which results in an error on the next run:
./run_tests.py
Loading disabled file
Traceback (most recent call last):
File "./run_tests.py", line 69, in <module>
state_reader.load()
File "/root/tempesta-test/helpers/shell.py", line 122, in load
self.has_file = self.loader.try_load()
File "/root/tempesta-test/helpers/shell.py", line 61, in try_load
self.state = self.__parse_file(st_file)
File "/root/tempesta-test/helpers/shell.py", line 74, in __parse_file
dump = json.load(st_file)
File "/usr/lib/python3.8/json/__init__.py", line 293, in load
return loads(fp.read(),
File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Sometimes, when kernel is crashed during the tests, empty
tests_resume.json
file remains. Which results in an error on the next run: