change the ERROR to WARNING; a message saying how to resolve these warnings
This commit is contained in:
parent
0499eb58be
commit
3965185683
11
test/test.py
11
test/test.py
@ -323,18 +323,18 @@ def verifyPDFs(manifestList):
|
|||||||
if os.access(f, os.R_OK):
|
if os.access(f, os.R_OK):
|
||||||
fileMd5 = hashlib.md5(open(f, 'rb').read()).hexdigest()
|
fileMd5 = hashlib.md5(open(f, 'rb').read()).hexdigest()
|
||||||
if 'md5' not in item:
|
if 'md5' not in item:
|
||||||
print 'ERROR: Missing md5 for file "' + f + '".',
|
print 'WARNING: Missing md5 for file "' + f + '".',
|
||||||
print 'Hash for current file is "' + fileMd5 + '"'
|
print 'Hash for current file is "' + fileMd5 + '"'
|
||||||
error = True
|
error = True
|
||||||
continue
|
continue
|
||||||
md5 = item['md5']
|
md5 = item['md5']
|
||||||
if fileMd5 != md5:
|
if fileMd5 != md5:
|
||||||
print 'ERROR: MD5 of file "' + f + '" does not match file.',
|
print 'WARNING: MD5 of file "' + f + '" does not match file.',
|
||||||
print 'Expected "' + md5 + '" computed "' + fileMd5 + '"'
|
print 'Expected "' + md5 + '" computed "' + fileMd5 + '"'
|
||||||
error = True
|
error = True
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
print 'ERROR: Unable to open file for reading "' + f + '".'
|
print 'WARNING: Unable to open file for reading "' + f + '".'
|
||||||
error = True
|
error = True
|
||||||
return not error
|
return not error
|
||||||
|
|
||||||
@ -363,7 +363,10 @@ def setUp(options):
|
|||||||
manifestList = json.load(mf)
|
manifestList = json.load(mf)
|
||||||
|
|
||||||
downloadLinkedPDFs(manifestList)
|
downloadLinkedPDFs(manifestList)
|
||||||
verifyPDFs(manifestList)
|
|
||||||
|
if not verifyPDFs(manifestList):
|
||||||
|
print 'Unable to verify the checksum for the files that are used for testing.'
|
||||||
|
print 'Please re-download the files, or adjust the MD5 checksum in the manifest for the files listed above.\n'
|
||||||
|
|
||||||
for b in testBrowsers:
|
for b in testBrowsers:
|
||||||
State.taskResults[b.name] = { }
|
State.taskResults[b.name] = { }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user