daca2: check all extracted files

This commit is contained in:
Daniel Marjamäki 2013-10-27 07:53:23 +01:00
parent 86358694fb
commit 9faaef840b
1 changed files with 7 additions and 13 deletions

View File

@ -27,6 +27,7 @@ def wget(filepath):
subprocess.call(['nice', 'wget', d + filepath]) subprocess.call(['nice', 'wget', d + filepath])
if os.path.isfile(filename): if os.path.isfile(filename):
return True return True
print('Sleep for 10 seconds..')
time.sleep(10) time.sleep(10)
return False return False
@ -118,6 +119,9 @@ def removeLargeFiles(path):
def scanarchive(filepath): def scanarchive(filepath):
# remove all files/folders except results.txt
removeAllExceptResults()
results = open('results.txt', 'at') results = open('results.txt', 'at')
results.write(DEBIAN[0] + filepath + '\n') results.write(DEBIAN[0] + filepath + '\n')
results.close() results.close()
@ -139,20 +143,13 @@ def scanarchive(filepath):
if filename[:5] == 'flite': if filename[:5] == 'flite':
results = open('results.txt', 'at') results = open('results.txt', 'at')
results.write('fixme: this package is skipped\n') results.write('fixme: the flite package is skipped\n')
results.close() results.close()
return return
dirname = None
for s in glob.glob(filename[:2] + '*'):
if os.path.isdir(s):
dirname = s
if dirname is None:
return
removeLargeFiles('') removeLargeFiles('')
print(filename + ': cppcheck ' + dirname) print('cppcheck ' + filename)
p = subprocess.Popen( p = subprocess.Popen(
['nice', ['nice',
@ -160,7 +157,7 @@ def scanarchive(filepath):
'-D__GCC__', '-D__GCC__',
'--enable=style', '--enable=style',
'--suppressions-list=../suppressions.txt', '--suppressions-list=../suppressions.txt',
dirname], '.'],
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE) stderr=subprocess.PIPE)
comm = p.communicate() comm = p.communicate()
@ -211,9 +208,6 @@ try:
results.close() results.close()
for archive in archives: for archive in archives:
# remove all files/folders except results.txt
removeAllExceptResults()
scanarchive(archive) scanarchive(archive)
except EOFError: except EOFError: