padv.BuildResult
Result from build system build
Description
Use the build result, padv.BuildResult
, to find the properties
of the build system build, including a list of the tasks that the build system ran and the
settings the build system used.
Creation
Description
stores
the results from a build system build.buildResultObj
= padv.BuildResult()
Properties
Start time of build, returned as datetime
.
Example:
09-Aug-2022 14:32:05
Data Types: datetime
End time of build, returned as datetime
.
Example:
09-Aug-2022 14:32:37
Data Types: datetime
Overall status for build, returned as the padv.TaskStatus
enumeration value:
Error
if a task iteration in the build returns an error.Fail
if none of the task iterations in the build return an error, but at least one task iteration fails.Pass
if none of the task iterations were run, or if none of the task iterations in the build return an error or fail.
Example: Pass
Task iteration result values, returned as a structure array with fields:
Pass
Warn
Fail
For example, if the build runs one task iteration and the task iteration returns one passing result and five warning results, the structure array contains:
struct with fields: Pass: 1 Warn: 5 Fail: 0
Data Types: struct
IDs for task iterations that passed during the build, returned as a cell array.
If the build system runs one task iteration and the task iteration passes,
PassTasks
returns a one-dimensional cell array. For example, if the
build system only ran the task padv.builtin.task.GenerateCode
on the
model AHRS_Voter.slx
and the task iteration passed,
PassTasks
returns:
{'padv.builtin.task.GenerateCode|sl_model_file|02_Models/AHRS_Voter/specification/AHRS_Voter.slx'}
If multiple task iterations pass, PassTasks
returns one cell for
each task iteration that passed. For
example:
{'padv.builtin.task.GenerateCode|sl_model_file|02_Models/AHRS_Voter/specification/AHRS_Voter.slx' } {'padv.builtin.task.GenerateCode|sl_model_file|02_Models/Actuator_Control/specification/Actuator_Control.slx' } {'padv.builtin.task.GenerateCode|sl_model_file|02_Models/Flight_Control/specification/Flight_Control.slx' } {'padv.builtin.task.GenerateCode|sl_model_file|02_Models/InnerLoop_Control/specification/InnerLoop_Control.slx'} {'padv.builtin.task.GenerateCode|sl_model_file|02_Models/OuterLoop_Control/specification/OuterLoop_Control.slx'}
Data Types: cell
IDs for task iterations that returned an error during the build, returned as a cell array.
If the build system runs one task iteration and the task iteration returns an error,
ErrorTasks
returns a one-dimensional cell array. For example, if
the build system tried to run a custom task, customTask
, on the model
AHRS_Voter.slx
, but the task iteration returned an error,
ErrorTasks
returns:
{'customTask|sl_model_file|02_Models/AHRS_Voter/specification/AHRS_Voter.slx'}
If multiple task iterations error, ErrorTasks
returns one cell
for each task iteration that returned an error. For
example:
{'customTask|sl_model_file|02_Models/AHRS_Voter/specification/AHRS_Voter.slx' } {'customTask|sl_model_file|02_Models/Actuator_Control/specification/Actuator_Control.slx' } {'customTask|sl_model_file|02_Models/Flight_Control/specification/Flight_Control.slx' } {'customTask|sl_model_file|02_Models/InnerLoop_Control/specification/InnerLoop_Control.slx'} {'customTask|sl_model_file|02_Models/OuterLoop_Control/specification/OuterLoop_Control.slx'}
Data Types: cell
IDs for task iterations that the build system skipped, returned as a cell array. The
build system skips task iterations that already have up-to-date results, unless you
specify Force
as true
when you call the function
runprocess
.
If the build system skips one task iteration, SkippedTasks
returns a one-dimensional cell array. For example, if you instructed the build system to
run the task padv.builtin.task.GenerateCode
on the model
AHRS_Voter.slx
, but the task iteration already had up-to-date
results, SkippedTasks
returns:
{'padv.builtin.task.GenerateCode|sl_model_file|02_Models/AHRS_Voter/specification/AHRS_Voter.slx'}
If the build system skips multiple task iterations, SkippedTasks
returns one cell for each task iteration that the build system skipped. For
example:
{'padv.builtin.task.GenerateCode|sl_model_file|02_Models/AHRS_Voter/specification/AHRS_Voter.slx' } {'padv.builtin.task.GenerateCode|sl_model_file|02_Models/Actuator_Control/specification/Actuator_Control.slx' } {'padv.builtin.task.GenerateCode|sl_model_file|02_Models/Flight_Control/specification/Flight_Control.slx' } {'padv.builtin.task.GenerateCode|sl_model_file|02_Models/InnerLoop_Control/specification/InnerLoop_Control.slx'} {'padv.builtin.task.GenerateCode|sl_model_file|02_Models/OuterLoop_Control/specification/OuterLoop_Control.slx'}
Data Types: cell
IDs for task iterations that failed during the build, returned as a cell array.
If the build system runs only one task iteration and the task iteration fails,
FailedTasks
returns a one-dimensional cell array. For example, if
the build system ran the task padv.builtin.task.GenerateCode
on the
model AHRS_Voter.slx
and the task iteration failed,
FailedTasks
returns:
{'padv.builtin.task.GenerateCode|sl_model_file|02_Models/AHRS_Voter/specification/AHRS_Voter.slx'}
If multiple task iterations fail, FailedTasks
returns one cell
for each task iteration that failed. For
example:
{'padv.builtin.task.GenerateCode|sl_model_file|02_Models/AHRS_Voter/specification/AHRS_Voter.slx' } {'padv.builtin.task.GenerateCode|sl_model_file|02_Models/Actuator_Control/specification/Actuator_Control.slx' } {'padv.builtin.task.GenerateCode|sl_model_file|02_Models/Flight_Control/specification/Flight_Control.slx' } {'padv.builtin.task.GenerateCode|sl_model_file|02_Models/InnerLoop_Control/specification/InnerLoop_Control.slx'} {'padv.builtin.task.GenerateCode|sl_model_file|02_Models/OuterLoop_Control/specification/OuterLoop_Control.slx'}
Data Types: cell
Input arguments that defined how the build system ran the build, returned as a structure array with fields:
TasksToBuild
— List of task iteration IDs that you want the build system to runIsolation
— Setting to include or ignore predecessorsForce
— Setting to skip or run up-to-date task iterationsRerunFailedTasks
— Setting to ignore or rerun failed task iterationsRerunErroredTasks
— Setting to ignore or rerun task iterations that returned an error
For example, the InputArgs
for a build result could
return:
struct with fields: TasksToBuild: [1×5 string] Isolation: 0 Force: 0 RerunFailedTasks: 0 RerunErroredTasks: 0
For more information, see runprocess
.
Data Types: struct
Examples
Open a project, run a build, and use the build result,
padv.BuildResult
, to get a list of the passed task iterations and the
settings that the build system used when running the build.
Open the Process Advisor example project, which contains an example process model.
processAdvisorExampleStart
Generate a list of the tasks defined by the process model.
tasks = generateProcessTasks;
Run the first five task iterations in tasks
and specify
Force
as
true
.
buildResult = runprocess(Force=true,Tasks=tasks(1:5))
Use the build result, buildResult
, to get a list of the task
iterations that
passed.
passed = buildResult.PassTasks'
passed = 5×1 cell array {'padv.builtin.task.GenerateSimulinkWebView|sl_model_file|02_Models/AHRS_Voter/specification/AHRS_Voter.slx' } {'padv.builtin.task.GenerateSimulinkWebView|sl_model_file|02_Models/Actuator_Control/specification/Actuator_Control.slx' } {'padv.builtin.task.GenerateSimulinkWebView|sl_model_file|02_Models/Flight_Control/specification/Flight_Control.slx' } {'padv.builtin.task.GenerateSimulinkWebView|sl_model_file|02_Models/InnerLoop_Control/specification/InnerLoop_Control.slx'} {'padv.builtin.task.GenerateSimulinkWebView|sl_model_file|02_Models/OuterLoop_Control/specification/OuterLoop_Control.slx'}
When you used the function runprocess
, you specified
Force
as true
. You can see that information in
the InputArgs
property of the build result,
buildResult
.
runprocessInputs = buildResult.InputArgs
runprocessInputs = struct with fields: TasksToBuild: ["padv.builtin.task.GenerateSimulinkWebView|sl_model_file|02_Models/AHRS_Voter/specification/AHRS_Voter.slx" … ] Isolation: 0 Force: 1 RerunFailedTasks: 0 RerunErroredTasks: 0
Force
setting was 1
(true
)
when the build system ran.You can export a build report that summarizes the task statuses, task results, and
other information about the task execution by using padv.ProcessAdvisorReportGenerator
to specify options for the report and
generateReport
to generate the
report.
rptObj = padv.ProcessAdvisorReportGenerator; generateReport(rptObj)
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)