[Discuss OpenCPI] Re: Unit testing with optional ports / testing failure conditions

From: James Kulp <jek_at_parera.com>
Date: Wed, 07 Jun 23 17:55:25 -0400

On 6/7/23 7:29 AM, dwp_at_md1tech.co.uk wrote:
>
> Am I doing something wrong here or is this a bug?
>
>
> _______________________________________________
> discuss mailing list -- discuss_at_lists.opencpi.org
> To unsubscribe send an email to discuss-leave_at_lists.opencpi.org

The applications generated by the unit test framework designate one
worker as the "done worker" (or "finished worker"), which is usually the
file writing worker associated with the first output port.

This is explained in the descriptions of the finishPort and
finishedWorkerIsUUT attributes in the documentation.

Since the default finished worker is for the first output port, when
that port is not connected (testOptional), then things won't work.
The "finishPort" attribute is unfortunately global, which means it is
set for all cases, and cannot be set per-case.

Certainly some better error messages would help here, as would the
ability to set "finishport" for each case.

But in fact it appears that the "testOptional" feature does not work
with multiple ports like this in any case.

You are unlucky this week.  Thanks for the report - it is clear what
needs fixing.

Jim





Received on Wed Jun 07 2023 - 21:55:25 CDT

This archive was generated by hypermail 2.3.0 : Fri Jun 05 2026 - 08:45:25 CDT