Previous 199869 Revisions Next

r23800 Wednesday 19th June, 2013 at 16:29:35 UTC by Oliver Stöneberg
chdtest.py: adjusted logging a bit (nw)
[src/regtests/chdman]chdtest.py

trunk/src/regtests/chdman/chdtest.py
r23799r23800
6868   sha1_extract_bin_2 = sha1sum(extractFileBin);
6969     
7070   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)"
7273      failure = True
7374
7475   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)"
7678      failure = True
7779     
7880def extractAndCompare(command, ext):
r23799r23800
103105   sha1_extract_2 = sha1sum(extractFile);
104106     
105107   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 + ")"
107110      failure = True
108111
109112currentDirectory = os.path.dirname(os.path.realpath(__file__))
r23799r23800
129132   
130133shutil.rmtree(tempPath)
131134   
132total_failure = False
135failure = False
133136
134137for root, dirs, files in os.walk(inputPath):
135138   for d in dirs:
r23799r23800
210213      sha1_out = sha1sum(outFile)
211214      sha1_temp = sha1sum(tempFile)
212215      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)"
214218         failure = True
215219
216      if failure:
217         print d + " failed"
218         total_failure = True
219
220if not total_failure:
220if not failure:
221221   print "All tests finished successfully"
No newline at end of file

Previous 199869 Revisions Next


© 1997-2024 The MAME Team