我正在为Azure DevOps上的Matlab/Simulink项目制作一个CI管道。生成管道是稳定的,并且与本地计算机执行的输出相同。然而,测试管道正在窃听。欢迎任何解决方案!
行动:
我的项目使用Modelon工具箱运行工厂模型。我的本地计算机运行所有matlab单元测试,运行一个Simulink文件,其中包括我的Modelon,没有任何问题,并且生成了jUnit测试报告。我调用相同的文件来使用azure-管道. the文件运行。
预期:
我期望得到与本地运行相同的结果,并在作业运行CLI上显示相同的pass/fail结果。
结果:
在Azure管道的执行中,FMU工厂在我所有的测试中都会失败。同样的错误29次。
https://www.modelon.com/products-services/modelon-deployment-suite/fmi-toolbox/
Error occurred in TestSim/testSim(File=****************_slx) and it did not run to completion.
---------
Error ID:
---------
'Simulink:modelReference:NormalModeSimulationError'
--------------
Error Details:
--------------
Error using testRunner (line 18)
An error occurred during simulation of Model block '*******************/PLANT_*****'.
Error in TestSim/testSim (line 31)
simOutRes = testRunner(File,duration);
Caused by:
Error using testRunner (line 18)
An error occurred during simulation of Model block 'PLANT_*****/*****/************'.
Error using testRunner (line 18)
Error reported by S-function 'sfun_fmu_cs_********' in 'PLANT_******************/******************************':
Error: FMI Toolbox running in DEMO mode: Only examples included in the FMI Toolbox distribution can be run.
Please contact sales@modelon.com in order to obtain an evaluation license or to purchase FMI Toolbox for MATLAB.
================================================================================信息:
这就是我试过的。
Version of the Licensing toolkit client library
v11.10.0.0 build 95001 x64_n6
---------------------
Performing test for feature: FMI_TOOLBOX
Feature: 'FMI_TOOLBOX'
Feature version: '2021.0625'
Feature is checked out
License type:
Server license IP: ******.******.***.***
2/2 licenses in use
Expiration date:
25-jun-2021
Number of days until expiration:
246
Start date:
10-jun-2020
License number:
****-****-****-****-****-****-****-****
Daemon name:
modelon
Notice:
Customer ************* Product FMI ToolBox for Matlab
Issuer:
Modelon AB。
发布于 2020-10-27 22:23:27
解决方案:
我发现网络服务帐户和我的用户帐户使用不同的%APPDATA%文件夹。
C:\Users\*******\AppData\Roaming\Modelon\Licenses\Server和
C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Modelon\Licenses\Server在网络服务文件夹中,我什么也没有,但在我的文件夹中,我有一个包含以下内容的fmi_licence.lic文件:
SERVER **************.com ANY *****
USE_SERVER在将该文件添加到“我的网络服务%APPDATA%”并将这些行添加到“我的Azure管道YMAL文件”后,许可证已检查为工作网络许可证,并且在网络服务帐户上运行时,我的项目停止了演示模式的工作。
#Making FMI Toolbox licence check
- script: |
echo fmitoolbox_license; > fmitoolboxLicenseCheck.m
displayName: 'Making FMI Toolbox licence check'
#FMI Toolbox licence check Action
- task: RunMATLABCommand@0
inputs:
command: fmitoolboxLicenseCheck
displayName: 'FMI Toolbox Licence Check Action'更多阅读:
Find temp folder for user Network Service?
https://superuser.com/questions/197576/network-service-account-password
https://stackoverflow.com/questions/64506869
复制相似问题