Commit Graph

5 Commits

Author SHA1 Message Date
Chen Wang
06c5cc0846 utest: move entry from examples to utest
Change the entry of utest's Kconfig from
'examples/utest/testcases/Kconfig' to
'Kconfig.utestcases'.

Modified the build scripts where the path name
is "examples/utest/testcases/Kconfig" and changed
it to 'Kconfig.utestcases', otherwise build
operations such 'scons --dist' may fail.

In the future, the testcase source code of
utest will be placed in each module for
maintenance, but the entry of Kconfig will all
be placed in Kconfig.utestcases for unified
maintenance. In this way, when executing menuconfig,
people can enter and configure from one place,
avoiding searching for utest configuration switches
here and there in the menuconfig interface.

For each module, you can maintain unit-test
in a unified manner in the following way:
- Create a subdirectory named 'utest' in the
  directory where your module is located.
- Store the following files in the utest subdirectory:
  - Unit test case program source code files for this
    module.
  - Kconfig file, add configuration options for the
    unit test files of this module, the recommended
    option is named RT_UTEST_TC_USING_XXXX, XXXX is the
    global unique module name of this module.
  - SConscript file, note that when adding src files,
    in addition to relying on RT_UTEST_TC_USING_XXXX,
    you must also rely on RT_UTEST_USING_ALL_CASES, the
    two dependencies are in an "or" relationship. The
    role of RT_UTEST_USING_ALL_CASES is that once this
    option is turned on, all unit tests will be enabled
    to avoid selecting one by one.

After completing the above steps, add the path of the
Kconfig file of utest of this module to the
Kconfig.utestcases file.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-08-26 10:26:47 +08:00
Bernard Xiong
c5a79de38e [tools] Add sdk_cfg.json setting for env CC detection 2025-01-11 21:20:25 -05:00
bernard
53b894c46c [tools] fix the SDK path issue in env script. 2024-08-28 18:31:22 -04:00
bernard
4633200e98 [tools] fix the SDK package path issue 2024-08-06 09:47:59 +08:00
LaterComer
4c5b203c0b [tools/env]统一tools中env相关的接口,优化env部分路径拼接 (#9185)
* 统一tools中env相关的接口到env_utility.py文件,并同步调整ci

* 移除非本提交的文件

---------

Co-authored-by: Meco Man <920369182@qq.com>
2024-07-31 00:52:25 +08:00