Commit graph

19 commits

Author SHA1 Message Date
Anas Nashif 0b999c0943 lib: move utilities into own folder
Move various utilities out of lib into own folder for better assignement
and management in the maintainer file. lib/os has become another dumping
ground for everything and it the Kconfig and contents in that folder
became difficult to manage, configure and test.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-22 09:54:12 +01:00
Anas Nashif 345735d0a8 tests: remove CONFIG_ZTEST_NEW_API in all tests
Remove all usage of CONFIG_ZTEST_NEW_API from tests and sample as this
is now enabled by default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Daniel Leung cc87f7757b tests: unit: rename shadowing variables
Renames	shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-10 08:14:12 +00:00
Yuval Peress f460c21578 test: update how unit tests set sources
Replaces cases of setting SOURCES before calling find_package with
proper target_sources.

Signed-off-by: Yuval Peress <peress@google.com>
2022-10-31 17:01:59 +01:00
NingX Zhao e57ac68efe tests: unit: rbtree: move testcases to new ZTEST API
Move testcases to the new ZTEST API.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2022-09-07 10:31:06 +02:00
Fabio Baltieri def230187b test: fix more legacy #include paths
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-02 16:41:41 +01:00
Yuval Peress ffc0983547 test: unittest: Fix deprecated ZephyrUnittest
Fix the deprecated calls to loading ZephyrUnittest by replacing them
with `Zephyr COMPONENTS unittest`.

Signed-off-by: Yuval Peress <peress@google.com>
2022-06-29 06:04:32 -04:00
Gerard Marull-Paretas ade7ccb918 tests: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all tests to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 20:02:14 +02:00
Nazar Kazakov f483b1bc4c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-18 13:24:08 -04:00
Torsten Rasmussen 52ff0cf208 cmake: tests: add cmake_minimum_required() to tests
Adding cmake_minimum_required() as this is required by CMake.

CMP0000 is a deprecated policy which allows to omit this function call,
however doing so will result in CMake printing a warning.

Adding cmake_minimum_required() to tests missing this call will remove
the warning and also allow us to remove the policy setting.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-12-18 14:58:55 +01:00
Ningx Zhao 184f0e29a2 kernel: rbtree: test rbtree minmax api
Add a testcase to test some api
to enhance the coverage of rbtree's source code.

Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>
2021-03-18 11:53:44 -04:00
Anas Nashif 9d0c633f88 Revert "tests: rbtree to add and modify some tastcases"
This reverts commit 09310462fd.

See #26619

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-02 14:40:20 -05:00
Torsten Rasmussen e1c1d1daca cmake: make find_package(ZephyrUnittest...) REQUIRED
This commit is a followup to PR #25808 which updates the tests to
ensure the REQUIRED keyword is also used for the ZephyrUnitest package.

This provides a better error message when building with CMake and
forgetting ZEPHYR_BASE or not registering Zephyr in the CMake package
registry.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-06-12 11:10:23 +02:00
Ningx Zhao 09310462fd tests: rbtree to add and modify some tastcases
Add two testcases,one of them verify rbtree node can be embedded
in any user struct.
And another verify some operations in logarithmic time.

Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>
2020-06-09 10:21:33 -04:00
Torsten Rasmussen 9095c9ef1b Revert "cmake: Get unit tests passing CI again"
This reverts commit 1bf839809c.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-03-31 10:00:15 -04:00
Kumar Gala 1bf839809c cmake: Get unit tests passing CI again
The following commit:

commit 407b49b35c (refs/bisect/bad)
Author: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Date:   Wed Feb 12 15:00:46 2020 +0100

    cmake: use find_package to locate Zephyr

breaks as we don't find the ZephyrUnittest package.  For now revert to
the old means until a proper fix can be made.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-27 14:16:37 -05:00
Torsten Rasmussen 407b49b35c cmake: use find_package to locate Zephyr
Using find_package to locate Zephyr.

Old behavior was to use $ENV{ZEPHYR_BASE} for inclusion of boiler plate
code.

Whenever an automatic run of CMake happend by the build system / IDE
then it was required that ZEPHYR_BASE was defined.
Using ZEPHYR_BASE only to locate the Zephyr package allows CMake to
cache the base variable and thus allowing subsequent invocation even
if ZEPHYR_BASE is not set in the environment.

It also removes the risk of strange build results if a user switchs
between different Zephyr based project folders and forgetting to reset
ZEPHYR_BASE before running ninja / make.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-03-27 16:23:46 +01:00
Anas Nashif 70758c4374 tests: fix test identifiers
The seasonal overhaul of test identifiers aligning the terms being used
and creating a structure. This is hopefully the last time we do this,
plan is to document the identifiers and enforce syntax.

The end-goal is to be able to generate a testsuite description from the
existing tests and sync it frequently with the testsuite in Testrail.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-09 15:53:44 -05:00
Anas Nashif 9004eb68dc tests: make rbtree tests unit tests
Move to a unit test, no need to build this for every platform we have.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-27 15:23:26 -04:00