[Discuss OpenCPI] Re: Unit testing with sequence property

From: <dwp_at_md1tech.co.uk>
Date: Wed, 31 May 23 15:44:32 +0000

Within the component spec I have:

`<Property name='frequencies' type='long' writable='true' sequenceLength='50'/>`

When I run `ocpidev build` from within the .test folder I get the following (I have replaced the name of the component with `<component_name>`):

`Spec is "local.uhd.uhd.<component_name>" in file "../lib/<component_name>-comp.xml"`\
`Looking for workers with the same spec: "local.uhd.uhd.<component_name>"`\
`Found worker for this spec:  <component_name>.rcc`\
`Writing cases/subcases report in "gen/cases.txt"`\
`` ocpigen: ../gen/runtime/base/src/BaseValue.cc:153: OCPI::Base::Value& OCPI::Base::Value::operator=(const OCPI::Base::Value&): Assertion `!v.m_parent' failed. ``\
`make: *** [/home/dwp/git/opencpi/cdk/include/test.mk:94: gen/cases.xml] Aborted (core dumped)`

For comparison, I have another component that I have a working unit test for that does not include any sequence properties, the test XML looks like this:

`<Tests UseHDLFileIo='true'>`\
` <Output port='out' script='verify.py'/>`\
` <Property name='sampleRate' values='10, 20'></Property>`\
` <Property name='duration' values='0.25, 1.0'></Property>`\
` <Property name='frequency' values='1, 2'></Property>`\
` <Property name='amplitude' values='100, 1000'></Property>`\
`</Tests>`

When I run `ocpidev build` from within that component’s .test folder I get this output:

`Spec is "local.uhd.uhd.<component_name>" in file "../lib/<component_name>-comp.xml"`\
`Looking for workers with the same spec: "local.uhd.uhd.<component_name>"`\
`Found worker for this spec:  <component_name>.rcc`\
`Writing cases/subcases report in "gen/cases.txt"`\
`Generating required HDL assemblies in gen/assemblies`\
`Generating required input and property value files in gen/inputs/ and gen/properties/`\
`Generating required application xml files in gen/applications/`\
`Generating summary gen/cases.xml file`






Received on Wed May 31 2023 - 15:44:32 CDT

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