Changeset 15719
- Timestamp:
- 08/06/13 10:07:11 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/NightlyRun/runme.m
r15499 r15719 21 21 % 'gia' : validation of gia tests 22 22 % ... 23 % 'procedure' 'check' : run the test (default) 24 % 'update': update the archive 23 % 'procedure' 'check' : run the test (default) 24 % 'update': update the archive 25 % 'valgrind': check for memory leaks (default value of md.debug.valgrind needs to be changed manually) 25 26 % 26 27 % Usage: … … 56 57 %GET procedure {{{ 57 58 procedure=getfieldvalue(options,'procedure','check'); 58 if ~ismember(procedure,{'check','update' })59 if ~ismember(procedure,{'check','update','valgrind'}) 59 60 disp('runme warning: procedure not supported, defaulting to test ''check''') 60 61 procedure='check'; … … 148 149 disp(sprintf(['File ./../Archives/' archive_name '.nc saved\n'])); 149 150 151 %CHECK for memory leaks? 152 elseif strcmpi(procedure,'valgrind'), 153 fields = fieldnames(md.results); 154 for i=1:numel(fields) 155 if ~isfield(md.results.(fields{i}),'errlog'), 156 disp(['Skipping ' fields{i}]); 157 continue; 158 else 159 disp(['Extracting results of ' fields{i}]); 160 end 161 errlog = cellstr(md.results.(fields{i}).errlog); 162 lines = strfind(errlog,'definitely lost:'); 163 lines = find(~cellfun(@isempty,lines)); 164 total = 0; 165 for j=1:numel(lines) 166 Line = errlog(lines(j)); 167 Numbers = sscanf(Line{1},'==%i== definitely lost: %s bytes in %i blocks',[1 Inf]); 168 total = total+ str2num(strrep(char(Numbers(2:end-1)),',','')); 169 end 170 if total==0, 171 disp(sprintf(['SUCCESS difference: 0 < 0 test id: %i test name: %s field: valgrind'],id,id_string)); 172 else 173 disp(sprintf(['ERROR difference: %i > 0 test id: %i test name: %s field: valgrind'],total,id,id_string)); 174 disp('STOP'); 175 return; 176 end 177 end 178 150 179 %ELSE: CHECK TEST 151 180 else,
Note:
See TracChangeset
for help on using the changeset viewer.