From 0499eb58be706c0913de2187f8c18679cfd2c59f Mon Sep 17 00:00:00 2001 From: notmasteryet Date: Sat, 12 Nov 2011 11:27:49 -0600 Subject: [PATCH 1/2] Warn (not fail) during MD5 verification, new MD5 for intelisa and f1040 --- test/test.py | 4 +--- test/test_manifest.json | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/test/test.py b/test/test.py index 65def5d8e..2eb144f9d 100644 --- a/test/test.py +++ b/test/test.py @@ -363,9 +363,7 @@ def setUp(options): manifestList = json.load(mf) downloadLinkedPDFs(manifestList) - - if not verifyPDFs(manifestList): - raise Exception('ERROR: failed to verify pdfs.') + verifyPDFs(manifestList) for b in testBrowsers: State.taskResults[b.name] = { } diff --git a/test/test_manifest.json b/test/test_manifest.json index 8085506a2..0bac41d34 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -19,7 +19,7 @@ }, { "id": "intelisa-load", "file": "pdfs/intelisa.pdf", - "md5": "f3ed5487d1afa34d8b77c0c734a95c79", + "md5": "f5712097d29287a97f1278839814f682", "link": true, "rounds": 1, "type": "load" @@ -194,7 +194,7 @@ }, { "id": "f1040", "file": "pdfs/f1040.pdf", - "md5": "7323b50c6d28d959b8b4b92c469b2469", + "md5": "b59272ce19b4a0c5808c8861441b0741", "link": true, "rounds": 1, "type": "load" From 39651856839b207ee0a605ec9585acd8e2a155bb Mon Sep 17 00:00:00 2001 From: notmasteryet Date: Mon, 14 Nov 2011 21:08:36 -0600 Subject: [PATCH 2/2] change the ERROR to WARNING; a message saying how to resolve these warnings --- test/test.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/test.py b/test/test.py index 2eb144f9d..256200587 100644 --- a/test/test.py +++ b/test/test.py @@ -323,18 +323,18 @@ def verifyPDFs(manifestList): if os.access(f, os.R_OK): fileMd5 = hashlib.md5(open(f, 'rb').read()).hexdigest() 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 + '"' error = True continue md5 = item['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 + '"' error = True continue else: - print 'ERROR: Unable to open file for reading "' + f + '".' + print 'WARNING: Unable to open file for reading "' + f + '".' error = True return not error @@ -363,7 +363,10 @@ def setUp(options): manifestList = json.load(mf) 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: State.taskResults[b.name] = { }