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>
This commit is contained in:
Anas Nashif 2023-12-20 08:07:43 -05:00 committed by Carles Cufí
commit 0b999c0943
24 changed files with 112 additions and 78 deletions

View file

@ -27,7 +27,7 @@
#include <zephyr/sys/base64.h>
#include <zephyr/ztest.h>
#include "../../../lib/os/base64.c"
#include "../../../lib/utils/base64.c"
static const unsigned char base64_test_dec[64] = {
0x24, 0x48, 0x6E, 0x56, 0x87, 0x62, 0x5A, 0xBD,

View file

@ -6,7 +6,7 @@
#include <zephyr/ztest.h>
#include <zephyr/sys/rb.h>
#include "../../../lib/os/rb.c"
#include "../../../lib/utils/rb.c"
#define _CHECK(n) \
zassert_true(!!(n), "Tree check failed: [ " #n " ] @%d", __LINE__)

View file

@ -6,7 +6,7 @@
#include <zephyr/ztest.h>
#include "timeutil_test.h"
#include "../../../lib/os/timeutil.c"
#include "../../../lib/utils/timeutil.c"
void timeutil_check(const struct timeutil_test_data *tp,
size_t count)

View file

@ -4,4 +4,4 @@ cmake_minimum_required(VERSION 3.20.0)
project(util)
find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE})
target_sources(testbinary PRIVATE main.c maincxx.cxx ${ZEPHYR_BASE}/lib/os/dec.c)
target_sources(testbinary PRIVATE main.c maincxx.cxx ${ZEPHYR_BASE}/lib/utils/dec.c)

View file

@ -8,7 +8,7 @@
/* This, uh, seems to be the standard way to unit test library code.
* Or so I gather from tests/unit/rbtree ...
*/
#include "../../../lib/os/winstream.c"
#include "../../../lib/utils/winstream.c"
#define BUFLEN 64