-
Notifications
You must be signed in to change notification settings - Fork 176
Regression testing of Modelica and ModelicaTest
Thomas Beutlich edited this page Feb 29, 2020
·
27 revisions
Regression testing consists of various steps to be performed as automated as possible.
-
Load libraries Modelica and ModelicaTest in Dymola and verify that you also loaded the Dymola-specific ModelicaServices
-
Clone the Release checks repository
git clone https://github.com/modelica-tools/msl-release
-
Open ReleaseChecks.mo in Dymola
-
Run the pedantic check on Modelica and ModelicaTest
ReleaseChecks.printExecutables(libraries={"Modelica", "ModelicaTest"})
- Check the created file "log_failed.txt" for all models that fail the pedantic translation and create a new gitHub issue.
- Open a git bash and run
git config --get remote.origin.url
git rev-parse --short HEAD
to determine the Git revision and Git URL of the repository under test.
- Simulate all example and test models with a tolerance of 1e-6
ReleaseChecks.simulateExecutables(libraries={"Modelica", "ModelicaTest"}, incrementalRun=false, tolerance=1e-6, gitURL="https://github.com/modelica/ModelicaStandardLibrary.git", gitRevision="add from above", description="Reg test MSL v4.0.0-rc.1")
The simulation results will be written to the output directories "modelica://Modelica/Resources/Reference/Modelica" and "modelica://ModelicaTest/Resources/Reference/ModelicaTest", respectively. In case these directories already contain simulation log files or simulation result files from previous runs, they will be deleted first.
- Repeat the simulation for all failed models with an increased tolerance
ReleaseChecks.simulateExecutables(libraries={"Modelica", "ModelicaTest"}, incrementalRun=true, tolerance=1e-5, gitURL="https://github.com/modelica/ModelicaStandardLibrary.git", gitRevision="add from above", description="Reg test MSL v4.0.0-rc.1")
ReleaseChecks.simulateExecutables(libraries={"Modelica", "ModelicaTest"}, incrementalRun=true, tolerance=1e-4, gitURL="https://github.com/modelica/ModelicaStandardLibrary.git", gitRevision="add from above", description="Reg test MSL v4.0.0-rc.1")
- Search the two output directories for files "check_failed.log", "translate_failed.log" and "simulate_failed.log" and create new GitHub issues.
wget -r --level=0 -np -nH --cut-dirs=3 -A csv http://www.ltx.de/download/MA/Compare_MSL_v3.2.3-rc.2/2018-12-15_230315_Modelica_v3.2.3-rc.2_2019
d:\ITI-Projekte-NoBak\csv-compare\Modelica_ResultCompare\bin\x64\Release\Compare.exe --mode csvTreeCompare --override --bitmap --tolerance 2e-3 --delimiter "," --verbosity 2 e:\compare\2018-12-15_230315_Modelica_v3.2.3-rc.2_2019\ t:\Referencemodels\Libraries\ModelicaStandardLibrary\ReferenceResults\v3.2.2+build.0-beta.3\ --logfile log.txt --comparisonflag --reportdir e:\compare\MSL323ALL\
In TC:
- find all directories containing a file compare_failed.log using content plugin FileInDir (Load saved search settings "Failed CSV comparisons")
- put search result to listbox
- select directories and copy directory structure to e:\compare\Failed\ using packer plugin TreeCopyPlus
d:\ITI-Projekte-NoBak\csv-compare\Modelica_ResultCompare\bin\x64\Release\Compare.exe --mode csvTreeCompare --override --tolerance 2e-3 --delimiter "," --verbosity 2 e:\compare\Failed\ t:\Referencemodels\Libraries\ModelicaStandardLibrary\ReferenceResults\v3.2.2+build.0-beta.3\ --logfile log.txt --comparisonflag --reportdir e:\compare\MSL323FAILED\
- Create git repo and push e:\compare\MSL323FAILED\