diff --git a/tests/test_backup.py b/tests/test_backup.py index c94bc682ee65376d000d9fc84147e9ca9583d508..ea8301a5fea4300b9dec37c2501207db62e92d8b 100755 --- a/tests/test_backup.py +++ b/tests/test_backup.py @@ -68,6 +68,7 @@ def test_backup_space(server): def check_local_backup(path): + all_ok = True for d in os.listdir(path): subd = os.path.join(path, d) latest = os.path.join(subd, 'latest') @@ -78,13 +79,13 @@ def check_local_backup(path): diff_seconds = (now - d).total_seconds() if diff_seconds > 25*3600: print('Backup %s is older than a day' % subd) - return False + all_ok = False else: print('Backup %s is fine' % subd) - return True else: print('Backup %s is not okay (no %s file)' % (subd, latest)) - return False + all_ok = False + return all_ok def check_local_backups(paths):