Changeset 5084


Ignore:
Timestamp:
08/09/10 12:27:36 (15 years ago)
Author:
Mathieu Morlighem
Message:

added output option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk/test/NightlyRun/runme.m

    r5050 r5084  
    6262        disp('runme warning: procedure not supported, defaulting to test ''check''')
    6363        procedure='check';
     64end
     65% }}}
     66%GET output {{{1
     67output=getfieldvalue(options,'output','none');
     68if ~ismember(output,{'nightly','daily','none'})
     69        disp('runme warning: output not supported, defaulting to test ''none''')
     70        output='none';
    6471end
    6572% }}}
     
    142149                                        directory=strsplit(pwd,'/');
    143150                                        message=getReport(me2)
    144                                         fid=fopen([ISSM_DIR '/TEMP/matlaberror.log'], 'at');
    145                                         fprintf(fid,'%s',message);
    146                                         fprintf(fid,'\n------------------------------------------------------------------\n');
    147                                         fclose(fid);
    148                                         disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,Id2Name(id),fieldname));
    149 
     151                                        if strcmpi(output,'nightly')
     152                                                fid=fopen([ISSM_DIR '/nightlylog/matlaberror.log'], 'at');
     153                                                fprintf(fid,'%s',message);
     154                                                fprintf(fid,'\n------------------------------------------------------------------\n');
     155                                                fclose(fid);
     156                                                disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,Id2Name(id),fieldname));
     157                                        elseif strcmpi(output,'daily');
     158                                                fid=fopen([ISSM_DIR '/dailylog/matlaberror.log'], 'at');
     159                                                fprintf(fid,'%s',message);
     160                                                fprintf(fid,'\n------------------------------------------------------------------\n');
     161                                                fclose(fid);
     162                                                disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,Id2Name(id),fieldname));
     163                                        end
    150164                                end
    151165                        end
     
    157171                directory=strsplit(pwd,'/');
    158172                message=getReport(me)
    159                 fid=fopen([ISSM_DIR '/TEMP/matlaberror.log'], 'at');
    160                 fprintf(fid,'%s',message);
    161                 fprintf(fid,'\n------------------------------------------------------------------\n');
    162                 fclose(fid);
    163                 disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: N/A'],id,Id2Name(id)));
     173                if strcmpi(output,'nightly')
     174                        fid=fopen([ISSM_DIR '/nightlylog/matlaberror.log'], 'at');
     175                        fprintf(fid,'%s',message);
     176                        fprintf(fid,'\n------------------------------------------------------------------\n');
     177                        fclose(fid);
     178                        disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,Id2Name(id),fieldname));
     179                elseif strcmpi(output,'daily');
     180                        fid=fopen([ISSM_DIR '/dailylog/matlaberror.log'], 'at');
     181                        fprintf(fid,'%s',message);
     182                        fprintf(fid,'\n------------------------------------------------------------------\n');
     183                        fclose(fid);
     184                        disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,Id2Name(id),fieldname));
     185                end
    164186        end
    165187end
Note: See TracChangeset for help on using the changeset viewer.