Skip to content

Commit

Permalink
Output the correct time on simulation failure instead of -1.0
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17640 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Oct 10, 2013
1 parent ddb1cb1 commit ad82e9e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Examples/BuildModelRecursive.mos
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ OpenModelica.Scripting.Internal.Time.timerTick(OpenModelica.Scripting.Internal.T
buildRes := res[1] <> \"\";
simRes := if not buildRes then false else 0 == system(\"ulimit -t "+ulimitExe+" ; ./"+s+" > \"+simFile+\" 2>&1\");
timeSim := OpenModelica.Scripting.Internal.Time.timerTock(OpenModelica.Scripting.Internal.Time.RT_CLOCK_USER_RESERVED);
timeSim := if simRes then timeSim else -1.0;
if simRes then
system(\"touch "+s+".simsuccess\");
end if;
Expand Down Expand Up @@ -116,7 +115,7 @@ sim:=readFile(simFile);
str:=\"<tr><td>\" + (if err <> \"\" then \"<a href=\"+errFile+\">"+s+"</a>\" else \""+s+"\") +
(if sim <> \"\" then \" (<a href=\"+simFile+\">sim</a>)\" else \"\") +
\"</td>\" +
cell(timeSim,greenOnOk=true,greenColor=greenColor) +
cell(if simRes then timeSim else -1.0,greenOnOk=true,greenColor=greenColor) +
\"<td bgcolor=\\\"\"+(if res[1]<>\"\" then greenColor else \"#FF0000\")+\"\\\">\"+OpenModelica.Scripting.Internal.Time.readableTime(total)+\"</td>\" +
sum(cell(d,greenColor=greenColor) for d in {frontend,backend,simcode,templates,build}) + \"</tr>\\n\";getErrorString();
writeFile(statFile,str);getErrorString();
Expand Down

0 comments on commit ad82e9e

Please sign in to comment.