trunk/src/regtests/chdman/chdtest.py
| r23799 | r23800 | |
| 68 | 68 | sha1_extract_bin_2 = sha1sum(extractFileBin); |
| 69 | 69 | |
| 70 | 70 | if not sha1_extract == sha1_extract_2: |
| 71 | | print "SHA1 mismatch (extractcd - " + type + " - toc) - expected: " + sha1_out + " found: " + sha1_temp |
| 71 | print "expected: " + sha1_out + " found: " + sha1_temp |
| 72 | print d + " - SHA1 mismatch (extractcd - " + type + " - toc)" |
| 72 | 73 | failure = True |
| 73 | 74 | |
| 74 | 75 | if not sha1_extract_bin == sha1_extract_bin_2: |
| 75 | | print "SHA1 mismatch (extractcd - " + type + " - bin) - expected: " + sha1_out + " found: " + sha1_temp |
| 76 | print "expected: " + sha1_out + " found: " + sha1_temp |
| 77 | print d + " - SHA1 mismatch (extractcd - " + type + " - bin)" |
| 76 | 78 | failure = True |
| 77 | 79 | |
| 78 | 80 | def extractAndCompare(command, ext): |
| r23799 | r23800 | |
| 103 | 105 | sha1_extract_2 = sha1sum(extractFile); |
| 104 | 106 | |
| 105 | 107 | if not sha1_extract == sha1_extract_2: |
| 106 | | print "SHA1 mismatch (" + command + " - " + ext + ") - expected: " + sha1_out + " found: " + sha1_temp |
| 108 | print "expected: " + sha1_out + " found: " + sha1_temp |
| 109 | print d + " - SHA1 mismatch (" + command + " - " + ext + ")" |
| 107 | 110 | failure = True |
| 108 | 111 | |
| 109 | 112 | currentDirectory = os.path.dirname(os.path.realpath(__file__)) |
| r23799 | r23800 | |
| 129 | 132 | |
| 130 | 133 | shutil.rmtree(tempPath) |
| 131 | 134 | |
| 132 | | total_failure = False |
| 135 | failure = False |
| 133 | 136 | |
| 134 | 137 | for root, dirs, files in os.walk(inputPath): |
| 135 | 138 | for d in dirs: |
| r23799 | r23800 | |
| 210 | 213 | sha1_out = sha1sum(outFile) |
| 211 | 214 | sha1_temp = sha1sum(tempFile) |
| 212 | 215 | if not sha1_out == sha1_temp: |
| 213 | | print "SHA1 mismatch (output file) - expected: " + sha1_out + " found: " + sha1_temp |
| 216 | print "expected: " + sha1_out + " found: " + sha1_temp |
| 217 | print d + " - SHA1 mismatch (output file)" |
| 214 | 218 | failure = True |
| 215 | 219 | |
| 216 | | if failure: |
| 217 | | print d + " failed" |
| 218 | | total_failure = True |
| 219 | | |
| 220 | | if not total_failure: |
| 220 | if not failure: |
| 221 | 221 | print "All tests finished successfully" |
| | No newline at end of file |