test: ignore empty files

Some raw log files may be empty if we cancelled tuhi at the wrong time. Skip
over those while testing

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
pull/174/head
Peter Hutterer 2019-08-22 09:44:15 +10:00
parent 6c94898458
commit 8690e305cf
1 changed files with 2 additions and 0 deletions

View File

@ -449,6 +449,8 @@ def search_for_tests():
with open(logfile) as fd:
try:
yml = yaml.load(fd, Loader=yaml.Loader)
if not yml:
continue
timestamp = yml['time']
test_name = f'test_log_{timestamp}'
test = generator(logfile)