Changeset 22a8249 in OpenModelica


Ignore:
Timestamp:
2023-03-22T15:21:34+01:00 (14 months ago)
Author:
AnHeuermann <andreas.heuermann@…>
Children:
d6fb23cd
Parents:
e8d53f78
Message:

Fix for Windows

Location:
testsuite/openmodelica/fmi/CoSimulation/2.0
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • testsuite/openmodelica/fmi/CoSimulation/2.0/ExportCvodeFmu_cmake.mos

    re8d53f78 r22a8249  
    22// keywords: fmu export simulation flags
    33// status: correct
    4 // teardown_command: rm -rf *.fmu Modelica_Mechanics_MultiBody_Examples_Elementary_Pendulum* Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum*  Pendulum-dynamic* Pendulum_dynamic* Pendulum_cs_systemCall* Pendulum_flags_dynamic.json
     4// teardown_command: rm -rf Pendulum*  Pendulum-dynamic* Pendulum_dynamic* Pendulum_cs_systemCall* Pendulum_flags_dynamic.json
    55// cflags: -d=-newInst
    66//
    7 // Export Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum as 2.0 CS FMU with CVODE solver
     7// Export Pendulum as 2.0 CS FMU with CVODE solver
    88
    99// Generate FMU
    1010loadModel(Modelica, {"3.2.3"}); getErrorString();
     11loadString("model Pendulum
     12extends Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum;
     13end Pendulum;"); getErrorString();
     14
    1115setCommandLineOptions("--fmiFlags=s:cvode --fmuCMakeBuild=true"); getErrorString();
    12 buildModelFMU(Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum, version = "2.0", fmuType="cs", platforms={"dynamic"}); getErrorString();
     16buildModelFMU(Pendulum, version = "2.0", fmuType="cs", platforms={"dynamic"}); getErrorString();
    1317
    1418// Check _flags.json for simulation flags
    15 system("unzip -cqq Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum.fmu resources/Modelica_Mechanics_MultiBody_Examples_Elementary_Pendulum_flags.json > Pendulum_flags_dynamic.json"); getErrorString();
     19system("unzip -cqq Pendulum.fmu resources/Pendulum_flags.json > Pendulum_flags_dynamic.json"); getErrorString();
    1620readFile("Pendulum_flags_dynamic.json"); getErrorString();
    1721
    1822// Simulate with OMSimulator
    19 system(getInstallationDirectoryPath() + "/bin/OMSimulator Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum.fmu --mode=cs --tolerance=1e-6 --resultFile=\"Pendulum_dynamic_res.mat\" --stopTime=1.0 --suppressPath=true --tempDir=\"Pendulum-dynamic-tmp\"", "Pendulum_cs_systemCall.log"); getErrorString();
     23system(getInstallationDirectoryPath() + "/bin/OMSimulator Pendulum.fmu --mode=cs --tolerance=1e-6 --resultFile=\"Pendulum_dynamic_res.mat\" --stopTime=1.0 --suppressPath=true --tempDir=\"Pendulum-dynamic-tmp\"", "Pendulum_cs_systemCall.log"); getErrorString();
    2024readFile("Pendulum_cs_systemCall.log");
    2125
     
    3337// true
    3438// ""
    35 // "Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum.fmu"
     39// true
     40// ""
     41// "Pendulum.fmu"
    3642// ""
    3743// 0
  • testsuite/openmodelica/fmi/CoSimulation/2.0/ExportCvodeFmu_dynamic.mos

    re8d53f78 r22a8249  
    22// keywords: fmu export simulation flags
    33// status: correct
    4 // teardown_command: rm -rf *.fmu Modelica_Mechanics_MultiBody_Examples_Elementary_Pendulum* Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum*  Pendulum-dynamic* Pendulum_dynamic* Pendulum_cs_systemCall* Pendulum_flags_dynamic.json
     4// teardown_command: rm -rf *.fmu Pendulum* Pendulum*  Pendulum-dynamic* Pendulum_dynamic* Pendulum_cs_systemCall* Pendulum_flags_dynamic.json
    55// cflags: -d=-newInst
    66//
    7 // Export Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum as 2.0 CS FMU with CVODE solver
     7// Export Pendulum as 2.0 CS FMU with CVODE solver
    88
    99// Generate FMU
    1010loadModel(Modelica, {"3.2.3"}); getErrorString();
     11loadString("model Pendulum
     12extends Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum;
     13end Pendulum;"); getErrorString();
    1114setCommandLineOptions("--fmiFlags=s:cvode"); getErrorString();
    12 buildModelFMU(Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum, version = "2.0", fmuType="cs", platforms={"dynamic"}); getErrorString();
     15buildModelFMU(Pendulum, version = "2.0", fmuType="cs", platforms={"dynamic"}); getErrorString();
    1316
    1417// Check _flags.json for simulation flags
    15 system("unzip -cqq Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum.fmu resources/Modelica_Mechanics_MultiBody_Examples_Elementary_Pendulum_flags.json > Pendulum_flags_dynamic.json"); getErrorString();
     18system("unzip -cqq Pendulum.fmu resources/Pendulum_flags.json > Pendulum_flags_dynamic.json"); getErrorString();
    1619readFile("Pendulum_flags_dynamic.json"); getErrorString();
    1720
    1821// Simulate with OMSimulator
    19 system(getInstallationDirectoryPath() + "/bin/OMSimulator Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum.fmu --mode=cs --tolerance=1e-6 --resultFile=\"Pendulum_dynamic_res.mat\" --stopTime=1.0 --suppressPath=true --tempDir=\"Pendulum-dynamic-tmp\"", "Pendulum_cs_systemCall.log"); getErrorString();
     22system(getInstallationDirectoryPath() + "/bin/OMSimulator Pendulum.fmu --mode=cs --tolerance=1e-6 --resultFile=\"Pendulum_dynamic_res.mat\" --stopTime=1.0 --suppressPath=true --tempDir=\"Pendulum-dynamic-tmp\"", "Pendulum_cs_systemCall.log"); getErrorString();
    2023readFile("Pendulum_cs_systemCall.log");
    2124
     
    3336// true
    3437// ""
    35 // "Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum.fmu"
     38// "Pendulum.fmu"
    3639// ""
    3740// 0
  • testsuite/openmodelica/fmi/CoSimulation/2.0/ExportCvodeFmu_static.mos

    re8d53f78 r22a8249  
    22// keywords: fmu export simulation flags
    33// status: correct
    4 // teardown_command: rm -rf *.fmu Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum* Modelica_Mechanics_MultiBody_Examples_Elementary_Pendulum* Pendulum-static* Pendulum_static* Pendulum_me_cs_systemCall.log Pendulum_flags_static.json
     4// teardown_command: rm -rf *.fmu Pendulum* Pendulum-static* Pendulum_static* Pendulum_me_cs_systemCall.log Pendulum_flags_static.json
    55// cflags: -d=-newInst
    66//
    7 // Export Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum as 2.0 CS FMU with CVODE solver
     7// Export Pendulum as 2.0 CS FMU with CVODE solver
    88
    99// Generate FMU
    1010loadModel(Modelica, {"3.2.3"}); getErrorString();
     11loadString("model Pendulum
     12extends Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum;
     13end Pendulum;"); getErrorString();
    1114setCommandLineOptions("--fmiFlags=s:cvode"); getErrorString();
    12 translateModelFMU(Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum, version = "2.0", fmuType="me_cs"); getErrorString();
     15translateModelFMU(Pendulum, version = "2.0", fmuType="me_cs"); getErrorString();
    1316
    1417// Check _flags.json for simulation flags
    15 system("unzip -cqq Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum.fmu resources/Modelica_Mechanics_MultiBody_Examples_Elementary_Pendulum_flags.json > Pendulum_flags_static.json"); getErrorString();
     18system("unzip -cqq Pendulum.fmu resources/Pendulum_flags.json > Pendulum_flags_static.json"); getErrorString();
    1619readFile("Pendulum_flags_static.json"); getErrorString();
    1720
    1821// Simulate with OMSimulator
    19 system(getInstallationDirectoryPath() + "/bin/OMSimulator Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum.fmu --mode=cs --tolerance=1e-6 --stopTime=1.0 --resultFile=\"Pendulum_static_res.mat\" --suppressPath=true --tempDir=\"Pendulum-static-tmp\"", "Pendulum_me_cs_systemCall.log"); getErrorString();
     22system(getInstallationDirectoryPath() + "/bin/OMSimulator Pendulum.fmu --mode=cs --tolerance=1e-6 --stopTime=1.0 --resultFile=\"Pendulum_static_res.mat\" --suppressPath=true --tempDir=\"Pendulum-static-tmp\"", "Pendulum_me_cs_systemCall.log"); getErrorString();
    2023readFile("Pendulum_me_cs_systemCall.log"); getErrorString();
    2124
     
    3336// true
    3437// ""
    35 // "Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum.fmu"
     38// true
     39// ""
     40// "Pendulum.fmu"
    3641// ""
    3742// 0
Note: See TracChangeset for help on using the changeset viewer.