Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TAeZoSysPro_testsuite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TAeZoSysPro
TAeZoSysPro_testsuite
Commits
83240cfc
Commit
83240cfc
authored
4 years ago
by
MARSOLLIER Felix
Browse files
Options
Downloads
Patches
Plain Diff
Addition of a ".mos" script to automate the test of models
parent
7cd344ff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Scripts/RunScript.mos
+66
-0
66 additions, 0 deletions
Scripts/RunScript.mos
with
66 additions
and
0 deletions
Scripts/RunScript.mos
0 → 100644
+
66
−
0
View file @
83240cfc
//
loading
of
the
necessary
libraries
loadModel
(
Modelica
);
getErrorString
();
loadFile
(
"C:/Users/fm4b8dfn/Documents/Modelica/TAeZoSysPro/package.mo"
);
getErrorString
();
loadFile
(
"C:/Users/fm4b8dfn/Documents/Modelica/TAeZoSysPro_testsuite/package.mo"
);
getErrorString
();
//
Creation
of
log
file
path_log
:=
"C:/Users/fm4b8dfn/Documents/Modelica/TAeZoSysPro_testsuite/Scripts/log.txt"
;
writeFile
(
path_log
,
""
);
//
package_list
:=
getPackages
(
TAeZoSysPro_testsuite
);
package_list_str
:=
{
typeNameString
(
package_list
[
i
])
for
i
in
1
:
size
(
package_list
,
1
)};
for
package_name
in
package_list_str
loop
subClasses_list
:=
getClassNames
(
stringTypeName
(
"TAeZoSysPro_testsuite"
+
"."
+
package_name
),
recursive
=
true
);
writeFile
(
path_log
,
package_name
+
"
\n
"
,
append
=
true
);
for
class_TypeName
in
subClasses_list
[
2
:
end
]
loop
writeFile
(
path_log
,
typeNameString
(
class_TypeName
)+
"
\n
"
,
append
=
true
);
if
isModel
(
class_TypeName
)
==
true
then
//
les
fonctions
"stringSplit"
et
"strtok"
ne
fonctionnent
pas
avec
la
version
1.16
.
Les
points
de
separation
de
classes
sont
convertis
en
slash
model_name
:=
typeNameString
(
class_TypeName
);
model_name
:=
stringReplace
(
model_name
,
"."
,
"/"
);
model_name
:=
basename
(
model_name
);
//
***
CHECK
OF
INSTANTIATION
***
instantiateModel
(
class_TypeName
);
errors
:=
getErrorString
();
if
errors
==
""
then
writeFile
(
path_log
,
"No errors during instantiation of "
+
model_name
+
"
\n
"
,
append
=
true
);
else
writeFile
(
path_log
,
"Following errors during instantiation of "
+
model_name
+
"
\n
"
,
append
=
true
);
writeFile
(
path_log
,
errors
+
"
\n
"
,
append
=
true
);
end
if
;
//
***
CHECK
OF
MODEL
CHECINKG
***
checkModel
(
class_TypeName
);
errors
:=
getErrorString
();
if
errors
==
""
then
writeFile
(
path_log
,
"No errors during check of "
+
model_name
+
"
\n
"
,
append
=
true
);
else
writeFile
(
path_log
,
"Following errors during check of "
+
model_name
+
"
\n
"
,
append
=
true
);
writeFile
(
path_log
,
errors
+
"
\n
"
,
append
=
true
);
end
if
;
//
***
CHECK
OF
SIMULATION
***
simulate
(
class_TypeName
);
errors
:=
getErrorString
();
if
errors
==
""
then
writeFile
(
path_log
,
"No errors during simulation of "
+
model_name
+
"
\n
"
,
append
=
true
);
else
writeFile
(
path_log
,
"Following errors during simulation of "
+
model_name
+
"
\n
"
,
append
=
true
);
writeFile
(
path_log
,
errors
+
"
\n
"
,
append
=
true
);
end
if
;
echo
(
true
);
end
if
;
end
for
;
end
for
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment