@@ -62,20 +62,22 @@ def print_log_dir_times(logdir, args):
6262 int (line .split ("Peak memory: " )[1 ].split ("KB" )[0 ]) / 1024
6363 )
6464
65- # content hash for .odb file alongside .log file is useful to
65+ # content hash for the result file alongside .log file is useful to
6666 # debug divergent results under what should be identical
6767 # builds(such as local and CI builds)
68- odb_file = pathlib .Path (
69- str (f ).replace ("logs/" , "results/" ).replace (".log" , ".odb" )
70- )
71- if odb_file .exists ():
72- hasher = hashlib .sha1 ()
73- with open (odb_file , "rb" ) as odb_f :
74- while chunk := odb_f .read (16 * 1024 * 1024 ):
75- hasher .update (chunk )
76- odb_hash = hasher .hexdigest ()
77- else :
78- odb_hash = "N/A"
68+ for ext in [".odb" , ".rtlil" , ".v" ]:
69+ result_file = pathlib .Path (
70+ str (f ).replace ("logs/" , "results/" ).replace (".log" , ext )
71+ )
72+ if result_file .exists ():
73+ hasher = hashlib .sha1 ()
74+ with open (result_file , "rb" ) as odb_f :
75+ while chunk := odb_f .read (16 * 1024 * 1024 ):
76+ hasher .update (chunk )
77+ odb_hash = hasher .hexdigest ()
78+ break
79+ else :
80+ odb_hash = "N/A"
7981
8082 if not found :
8183 print ("No elapsed time found in" , str (f ), file = sys .stderr )
0 commit comments