This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ncs, zephyr ztest + zigbee subsystem

I want to implement integration tests of the ZigBee subsystem on nrf52 and looking for a way to launch them by CI script.
We need such a feature for automatic testing after hardware assembly.
My first problem is that when adding CONFIG_ZTEST to prj.conf in my working project, I get 'ncs/nrf/subsys/zigbee/osif/zb_nrf_platform.c:139:15: error: too many arguments to function 'zb_schedule_app_callback'' error.
Can tell me what am I doing wrong?
Second thing is that the tests will be split into client / server side and I want to run them on dedicated client / server hardware.
Is there any way to run them on bulk?

I was thinking about running them with sanity check one by one running pairs of client + server test cases. Is there a better way to do this?

Parents
  • Hi,

    I got a reply from the Zigbee team now. They were unable to reproduce the issue, and the API for the zb_schedule_app_callback has not changed in NCS. 

    There is one functionality that one may not be aware of: the ZB_SCHEDULE_APP_CALLBACK macro is overridden by the zb_osif_platform.h file to resolve to the NCS-specific variant: zigbee_schedule_callback, which allow us to call the ZBOSS scheduler API from interrupt as well as other thread contexts.

    It would be good to know what it is you want to achieve:

    1. Is it about mocking ZBOSS API?
    2. Testing pieces of ZBOSS API using the fully functional library?
    3. Running full samples on HW?

    There are a few tests, written for testing ZBOSS OSIF implementation, that use ZTEST. You can take a look at them to get a good, working starting point. They are located under "nrf/tests/subsys/zigbee". The "zboss_api" subdirectory implements tests described in the 2nd case and the "osif" implements the 1st case.

    Best regards,

    Marte

Reply
  • Hi,

    I got a reply from the Zigbee team now. They were unable to reproduce the issue, and the API for the zb_schedule_app_callback has not changed in NCS. 

    There is one functionality that one may not be aware of: the ZB_SCHEDULE_APP_CALLBACK macro is overridden by the zb_osif_platform.h file to resolve to the NCS-specific variant: zigbee_schedule_callback, which allow us to call the ZBOSS scheduler API from interrupt as well as other thread contexts.

    It would be good to know what it is you want to achieve:

    1. Is it about mocking ZBOSS API?
    2. Testing pieces of ZBOSS API using the fully functional library?
    3. Running full samples on HW?

    There are a few tests, written for testing ZBOSS OSIF implementation, that use ZTEST. You can take a look at them to get a good, working starting point. They are located under "nrf/tests/subsys/zigbee". The "zboss_api" subdirectory implements tests described in the 2nd case and the "osif" implements the 1st case.

    Best regards,

    Marte

Children
No Data
Related