Skip to content

Commit

Permalink
Fix compliance suite
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16499 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jun 27, 2013
1 parent 13b5428 commit cf7ee50
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Examples/ComplianceSuite.mos
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ system("rm -f ModelicaCompliance.*.res");getErrorString();

echo(false);
allClasses:={cl for cl guard classAnnotationExists(cl,__ModelicaAssociation.TestCase.shouldPass) in getClassNames(recursive=true)};getErrorString();
commands:={"ulimit -t 120 && omc +d=nogen \"" + fixName(OpenModelica.Scripting.typeNameString(cl)) + ".mos\" > /dev/null 2>&1" for cl in allClasses};
commands:={"ulimit -t 120 && (omc +d=nogen \"" + fixName(OpenModelica.Scripting.typeNameString(cl)) + ".mos\" > /dev/null 2>&1)" for cl in allClasses};
echo(true);
String(size(allClasses,1)) + " number of classes";

min(OpenModelica.Scripting.writeFile(fixName(typeNameString(cl))+".mos","
OpenModelica.Scripting.writeFile(\""+fixName(typeNameString(cl))+".res\",\"<testcase name=\\\""+OpenModelica.Scripting.escapeXML(last(OpenModelica.Scripting.typeNameStrings(cl)))+"\\\"><error type=\\\"killed\\\"/></testcase>\");
OpenModelica.Scripting.writeFile(\""+fixName(typeNameString(cl))+".res\",\"<testcase name=\\\""+fixName(last(OpenModelica.Scripting.typeNameStrings(cl)))+"\\\"><error type=\\\"killed\\\"/></testcase>\");
loadModel(ModelicaCompliance);getErrorString();
deleteClass(ModelicaCompliance.Components.Declarations.DoubleDeclarationComps);getErrorString();
deleteClass(ModelicaCompliance.Components.Declarations.DoubleDeclarationMixed);getErrorString();
Expand All @@ -47,7 +47,7 @@ resultFile := rec.resultFile;
messages := rec.messages;
messages := OpenModelica.Scripting.escapeXML(firstPart(messages));
success := resultFile "+(if OpenModelica.Scripting.getBooleanClassAnnotation(cl,__ModelicaAssociation.TestCase.shouldPass) then"<>"else"==")+" \"\";
writeFile(\""+fixName(typeNameString(cl))+".res\",\"<testcase name=\\\""+OpenModelica.Scripting.escapeXML(last(OpenModelica.Scripting.typeNameStrings(cl)))+"\\\">\"+(if not success then \"<error type=\\\""+(if OpenModelica.Scripting.getBooleanClassAnnotation(cl,__ModelicaAssociation.TestCase.shouldPass) then "expected failure" else "failed")+"\\\" message=\\\"\"+messages+\"\\\"/>\" else \"\")+\"</testcase>\");
writeFile(\""+fixName(typeNameString(cl))+".res\",\"<testcase name=\\\""+fixName(last(OpenModelica.Scripting.typeNameStrings(cl)))+"\\\">\"+(if not success then \"<error type=\\\""+(if OpenModelica.Scripting.getBooleanClassAnnotation(cl,__ModelicaAssociation.TestCase.shouldPass) then "expected failure" else "failed")+"\\\" message=\\\"\"+messages+\"\\\"/>\" else \"\")+\"</testcase>\");
") for cl in allClasses);
getErrorString();
system_parallel(commands);getErrorString();
Expand Down

0 comments on commit cf7ee50

Please sign in to comment.