[TRAVIS] Print a '.' every 50 files added to an archive.

It will avoid travis-ci to kill the job because of the absence of output.
This commit is contained in:
Matthieu Gautier 2018-07-12 17:46:06 +02:00
parent 1a4267a887
commit bae484f7ae
1 changed files with 5 additions and 0 deletions

View File

@ -195,8 +195,13 @@ def make_deps_archive(target, full=False):
files_to_archive += HOME.glob('**/TOOLCHAINS') files_to_archive += HOME.glob('**/TOOLCHAINS')
relative_path = HOME relative_path = HOME
counter = 50
with tarfile.open(str(relative_path/archive_name), 'w:gz') as tar: with tarfile.open(str(relative_path/archive_name), 'w:gz') as tar:
for name in set(files_to_archive): for name in set(files_to_archive):
counter -= 1
if not counter:
print('.', end='', flush=True)
counter = 50
tar.add(str(name), arcname=str(name.relative_to(relative_path))) tar.add(str(name), arcname=str(name.relative_to(relative_path)))
return relative_path/archive_name return relative_path/archive_name