ztest header not found

Windows 11, VSCode, NCS v2.3.0

Hi, I have a well-working application that I would like to build ztests for.

I'm reading about how to do that on the test framework page: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/develop/test/ztest.html

It links to an example: https://github.com/nrfconnect/sdk-zephyr/blob/f8f113382356934cb6d1ef4cdad95a843f922085/samples/subsys/testsuite/integration/prj.conf

I added the two lines to my prj.conf

CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
Now there's an error saying syscalls/ztest_test_new.h can't be found:
In file included from C:\ncs\v2.3.0\zephyr\subsys\testsuite\ztest\include\zephyr\ztest_test.h:12,
                 from C:\ncs\v2.3.0\zephyr\subsys\testsuite\ztest\include\zephyr\ztest.h:51,
                 from C:\ncs\v2.3.0\zephyr\subsys\testsuite\ztest\src\ztest_new.c:7:
C:\ncs\v2.3.0\zephyr\subsys\testsuite\ztest\include\zephyr\ztest_test_new.h:253:10: fatal error: syscalls/ztest_test_new.h: No such file or directory
  253 | #include <syscalls/ztest_test_new.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
If I comment-out the CONFIG_ZTEST_NEW_API line, it seems the (old api?) syscalls/ztest_test.h can't be found
In file included from C:\ncs\v2.3.0\zephyr\subsys\testsuite\ztest\include\zephyr\ztest.h:51,
                 from C:\ncs\v2.3.0\zephyr\subsys\testsuite\ztest\src\ztest_error_hook.c:7:
C:\ncs\v2.3.0\zephyr\subsys\testsuite\ztest\include\zephyr\ztest_test.h:29:10: fatal error: syscalls/ztest_test.h: No such file or directory
   29 | #include <syscalls/ztest_test.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
What do I need to do to get this to work?
Thanks.
Parents Reply Children
No Data
Related