New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration and road map from the deprecated testing API to the new ZTEST API. #47002
Comments
for all of those working on this, do not have a test_ prefix in the testsuite name. This is just confusing and redundant. |
@aaronemassey , I have a problem here, there used to be some test fucntions are registerred as shall command see below code
shall we create a marco for ZTEST_SH which looks like below
|
Move lib tests to use new ztest API Part of zephyrproject-rtos#47002 effort Signed-off-by: Spoorthy Priya Yerabolu <spoorthy.priya.yerabolu@intel.com>
Looking at this still, but I'm a bit confused as to actually how the SHELL_COMMAND_REGISTER macro is actually being leveraged in this test. It looks like the test is simply running the test functions themselves without respect to the shell command macro. Maybe we can discuss this at the next working group meeting (tomorrow). Apologies for late response. Been moving. |
Move lib tests to use new ztest API Part of #47002 effort Signed-off-by: Spoorthy Priya Yerabolu <spoorthy.priya.yerabolu@intel.com>
Move lib tests to use new ztest API Part of zephyrproject-rtos#47002 effort Signed-off-by: Spoorthy Priya Yerabolu <spoorthy.priya.yerabolu@intel.com>
Move lib tests to use new ztest API Part of #47002 effort Signed-off-by: Spoorthy Priya Yerabolu <spoorthy.priya.yerabolu@intel.com>
@aaronemassey subsys/fs is wrong checked in the issue. See: https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/subsys/fs. I started working on it and added my name to the task. |
1. config ztest_new_api and update the testcase defines 2. remove shell interactive test cases, twister has another plan 3. add sg case support for kinetis and rt10xx platfrom related: zephyrproject-rtos#47002 Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
move to ztest_new api for adc tests. some naming changes as well related: zephyrproject-rtos#47002 Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
1. config ztest_new_api and update the testcase defines 2. remove shell interactive test cases, twister has another plan 3. add sg case support for kinetis and rt10xx platfrom related: #47002 Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
move to ztest_new api for adc tests. some naming changes as well related: #47002 Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
1. config ztest_new_api and update the testcase defines 2. remove shell interactive test cases, twister has another plan 3. add sg case support for kinetis and rt10xx platfrom related: zephyrproject-rtos#47002 Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
move to ztest_new api for adc tests. some naming changes as well related: zephyrproject-rtos#47002 Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Convert nvs tests to use new ztest API related: zephyrproject-rtos#47002 Signed-off-by: Simon Hein <SHein@baumer.com>
Convert nvs tests to use new ztest API related: #47002 Signed-off-by: Simon Hein <SHein@baumer.com>
Migrating mem_alloc tests to new ztest API. Part of zephyrproject-rtos#47002 effort Signed-off-by: Spoorthy Priya Yerabolu <spoorthy.priya.yerabolu@intel.com>
I feel like this can be closed with the deprecation of the old API in v3.4 |
Migration and road map from deprecated testing API to the current API.
Each test suite should be refactored to the new ZTEST API.
Some example API migrations
Migration status
The list below was initially generated by finding tests without a
ZTEST_SUITE
macro usage and roughly categorizing them with respect to their directories and
tested features. For example,
tests/application_development
andtests/arch/arm
contain unmigrated tests.controller/ctrl_
connection{less}_*
Simple migration workflow
This does not cover all migration cases nor the entirety of the ZTEST API. This
is just a simple workflow get started on simple tests.
ztest_test_suite()
and its containing function with aZTEST_SUITE()
defined here with documentedparameters.
zassert
withZTEST
orZTEST_USER
.CONFIG_ZTEST_NEW_API=y
to the test'sprj.conf
.Difficulty or questions
Usually, a single test's migration shouldn't require more than 10 minutes. If
you're having difficulty porting a test or understanding how to use the new
ZTEST API, then make a comment on this issue.
Some suggestions
The text was updated successfully, but these errors were encountered: