- Timestamp:
- 01/10/22 13:35:22 (3 years ago)
- Location:
- XIOS/dev/dev_ym/XIOS_COUPLING
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/memtrack.cpp
r2274 r2286 510 510 sprintf(strbuff,"... %s:%d\n", fileName, lineNum); 511 511 memReport<<strbuff ; 512 pBlockHeader->backTrace(memReport, myaddr2line);513 //pBlockHeader->backTrace(memReport);512 //pBlockHeader->backTrace(memReport, myaddr2line); 513 pBlockHeader->backTrace(memReport); 514 514 i++ ; 515 515 } -
XIOS/dev/dev_ym/XIOS_COUPLING/xios_test_suite/TEST_SUITE/step2.py
r2283 r2286 46 46 if line and not line.startswith("#"): 47 47 yield line 48 49 50 def extract_bytes( filename ): 51 print( filename ) 52 fmem = open(filename, 'r') 53 bytes_tot = 0 54 for line in fmem: 55 if not( "bytes" in line ): 56 continue 57 58 bytes_line = line.replace("\n", "") 59 print( bytes_line.split() ) 60 bytes_str = bytes_line.split()[2] 61 if (bytes_str.isdigit() ): 62 bytes_tot += int( bytes_str ) 63 fmem.close() 64 65 return bytes_tot 66 48 67 49 68 def main(): … … 132 151 elif ( enable_mem_track=='--memtrack full' ) and ( '.mem' in files_list ) : # mem file 133 152 validated = 1 134 OSinfo("diff "+config+"/"+checkfile+" "+"reference/ref_"+config+"/"+checkfile+" | grep bytes 2>&1 > diff_"+checkfile+".txt") 135 if os.stat("diff_"+checkfile+".txt").st_size==0: # if no diff -> set 0 153 ref_memory = extract_bytes( "reference/ref_"+config+"/"+checkfile ) 154 res_memory = extract_bytes( config+"/"+checkfile ) 155 if ( ref_memory == res_memory ) : 136 156 validated = 1 137 else: # if diff returns diff -> set -1157 else: 138 158 validated = -1 139 159 report.write(folder_name+" "+folder_name+"@"+config_name+" "+folder_name+"@"+config_name+"@"+checkfile+" "+str(validated)+"\n")
Note: See TracChangeset
for help on using the changeset viewer.