Re: Running ZTest for custom drivers on Boards.


Nashif, Anas
 

Hi,

That is correct, a test is just another application.

Try a test that is known to work, for example a kernel test and see if you get the output.

 

Anas

 

From: dhananjay gj [mailto:dhguja@...]
Sent: Tuesday, February 6, 2018 9:54 AM
To: Nashif, Anas <anas.nashif@...>
Cc: zephyr-users@...
Subject: Re: [Zephyr-users] Running ZTest for custom drivers on Boards.

 

Hello Anas,

            Thank you for the reply.

 

So it means just like running an application, i can run the testcases as an application from "zephyr/tests/xx_yy" folder on my board?

 

I tried it but i could find any prints related to my test case nor any effect on my device.

I am using nRF52 based board and seeing in RTT console.

 

Is there something i am missing in my understanding in the framework?

Regards,

Dhananjay G J

 

On Tue, Feb 6, 2018 at 3:42 PM, Nashif, Anas <anas.nashif@...> wrote:

Hi,

Running sanitycheck on a specific device is currently not supported, but it is a highly requested features and is planned. You could always go into the test you are interested in and just flash the binary to the device you are testing for now.

 

Anas

 

From: zephyr-users-bounces@... [mailto:zephyr-users-bounces@...] On Behalf Of dhananjay gj
Sent: Tuesday, February 6, 2018 9:13 AM
To: zephyr-users@...
Subject: [Zephyr-users] Running ZTest for custom drivers on Boards.

 

Hello All,

        I created a custom driver for one of our device on a board and wanted to write testcases for it. I can build the testcases by following other test driver folders like gpio or i2c , but these are not running the test_main() which is supposed to run the test suite that i wrote. And I also followed the zephyr documentation about using the sanitycheck script, but i think this just builds the project if i understood it. I would like to know how to run unit tests on the board for my devices instead of qemu on the PC.

This may be rookie question but i could find any documentation how about can we do this on boards if its possible. Any leads on this will be helpful.

Many thanks for the support.

Regards,
Dhananjay G J

 

Join users@lists.zephyrproject.org to automatically receive all group messages.