donate-cpu: skip torture test file

This commit is contained in:
Daniel Marjamäki 2022-05-20 23:20:16 +02:00
parent 5e9d06d435
commit 31560299f8
2 changed files with 15 additions and 3 deletions

View File

@ -191,7 +191,11 @@ while True:
if tgz is None:
print("No package downloaded")
continue
if not unpack_package(work_path, tgz):
skip_files = None
if package.find('/qtcreator/') > 0:
# macro_pounder_fn.c is a preprocessor torture test that takes time to finish
skip_files = ('macro_pounder_fn.c',)
if not unpack_package(work_path, tgz, skip_files=skip_files):
print("No files to process")
continue
crash = False

View File

@ -15,7 +15,7 @@ import shlex
# Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/
# Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic
# changes)
CLIENT_VERSION = "1.3.23"
CLIENT_VERSION = "1.3.24"
# Timeout for analysis with Cppcheck in seconds
CPPCHECK_TIMEOUT = 30 * 60
@ -234,7 +234,7 @@ def download_package(work_path, package, bandwidth_limit):
return destfile
def unpack_package(work_path, tgz, cpp_only=False):
def unpack_package(work_path, tgz, cpp_only=False, skip_files=None):
print('Unpacking..')
temp_path = os.path.join(work_path, 'temp')
__remove_tree(temp_path)
@ -252,6 +252,14 @@ def unpack_package(work_path, tgz, cpp_only=False):
# Skip dangerous file names
continue
elif member.name.lower().endswith(header_endings + source_endings):
if skip_files is not None:
skip = False
for skip_file in skip_files:
if member.name.endswith('/' + skip_file):
skip = True
break
if skip:
continue
try:
tf.extract(member.name, temp_path)
if member.name.lower().endswith(source_endings):