Pipeline Composition
Report Status Pipeline
Count Failures
A final report stage can count failed checks and compare the result with an allowed budget.
Program
Play the program to choose the failure budget and watch the report status update.
report_status_pipeline.f90
program report_status_pipeline_demo
implicit none
integer :: checks(4)
integer :: max_failures
integer :: failed
integer :: i
character(len=8) :: status
checks = [0, 1, 0, 1]
max_failures =
failed = 0
do i = 1, 4
if (checks(i) /= 0) failed = failed + 1
end do
if (failed <= max_failures) then
status = 'pass'
else
status = 'review'
end if
print '(I0, 1X, I0, 1X, A)', failed, max_failures, trim(status)
end program report_status_pipeline_demo
program report_status_pipeline_demo
implicit none
integer :: checks(4)
integer :: max_failures
integer :: failed
integer :: i
character(len=8) :: status
checks = [0, 1, 0, 1]
max_failures =
failed = 0
do i = 1, 4
if (checks(i) /= 0) failed = failed + 1
end do
if (failed <= max_failures) then
status = 'pass'
else
status = 'review'
end if
print '(I0, 1X, I0, 1X, A)', failed, max_failures, trim(status)
end program report_status_pipeline_demo
program report_status_pipeline_demo
implicit none
integer :: checks(4)
integer :: max_failures
integer :: failed
integer :: i
character(len=8) :: status
checks = [0, 1, 0, 1]
max_failures =
failed = 0
do i = 1, 4
if (checks(i) /= 0) failed = failed + 1
end do
if (failed <= max_failures) then
status = 'pass'
else
status = 'review'
end if
print '(I0, 1X, I0, 1X, A)', failed, max_failures, trim(status)
end program report_status_pipeline_demo
failure budget
`max_failures` is the allowed number of nonzero checks.
status
The report status depends on the final count and budget.
final stage
The pipeline turns raw checks into a compact report line.