Skip to content

Commit

Permalink
Moved the MSL 3.2.x reference files to the root
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed May 4, 2015
1 parent 9e0ccd5 commit 162277d
Show file tree
Hide file tree
Showing 293 changed files with 6 additions and 5 deletions.
File renamed without changes.
6 changes: 3 additions & 3 deletions TODO-svn-merge.md
Expand Up @@ -8,9 +8,9 @@ Most of these can be fixed by using the new libraries (more libraries are includ
By doing a checkModel instead of a huge flattening test that just causes
large diffs when changing the frontend.

Reference files should be put in the root directory with an environment
variable passing the path to each test case.
Reference files should in no case be larger than 1MB.
- Reference files should be put in the root directory with an environment
variable passing the path to each test case (started: msl32 files were moved).
- Reference files should in no case be larger than 1MB.

## List of stupid directories

Expand Down
1 change: 1 addition & 0 deletions rtest
Expand Up @@ -15,6 +15,7 @@ if ($cwd =~ m/(.*)testsuite\/(.+)$/) {
$OPENMODELICAHOME="$1build";
$dirname=$2;
$ENV{'OPENMODELICAHOME'} = $OPENMODELICAHOME;
$ENV{'REFERENCEFILES'} = "$1testsuite/ReferenceFiles";
} else {
print "You must run rtest from the testsuite (was run from $cwd)\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion simulation/libraries/common/ModelTesting.mos
Expand Up @@ -142,7 +142,7 @@ elseif (modelTestingType == OpenModelicaModelTesting.Kind.VerifiedSimulation) or
end if;
/* We can only compare to a reference file if we have one */
modelNameStr := typeNameString(modelName);
referenceFile := if referenceFile == "" then "ReferenceFiles/" + modelNameStr + ".mat" else referenceFile;
referenceFile := if referenceFile == "" then getEnvironmentVar("REFERENCEFILES") + "/msl32/" + modelNameStr + ".mat" else referenceFile;
if regularFileExists(referenceFile+".xz") then
system("if test ! -f "+referenceFile+" || test "+referenceFile+".xz -nt "+referenceFile+"; then xz --keep --decompress --force "+referenceFile+".xz ; fi");
referenceExists := true;
Expand Down
2 changes: 1 addition & 1 deletion simulation/libraries/common/ModelTestingDefaults.mos
Expand Up @@ -8,7 +8,7 @@ stopTime := 0.0; // 0.0 means to read the stopTime from the experiment annotatio
relTol := 0.01; // Tolerance for the simulation comparison
absTol := 0.0001; // Tolerance for the simulation comparison
compareVars := fill("",0); // Default compares all variables. Not recommended, but is the only reasonable default'
referenceFile := ""; // Default reference file is ReferenceFile/modelName.mat
referenceFile := ""; // Default reference file is $REFERENCEFILES/msl32/modelName.mat
modelTesting := "../common/ModelTesting.mos";
outputFormat :="mat";
simflags := ""; // Options sent to the simulation runtime
Expand Down

0 comments on commit 162277d

Please sign in to comment.