Create Zephyr workspace app
Build / Build app and tests (ubuntu-22.04) (push) Failing after 1m22s
Documentation / Build (1.14.0) (push) Failing after 22s
Documentation / Build (1.9.6) (push) Failing after 12s
Documentation / Deploy (push) Has been skipped
Build / Build app and tests (macos-14) (push) Has been cancelled
Build / Build app and tests (windows-2022) (push) Has been cancelled

This commit is contained in:
2026-04-21 17:13:01 -07:00
commit b69d3363f1
63 changed files with 4433 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
# Copyright (c) 2021, Legrand North America, LLC.
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(app_lib_custom_test)
target_sources(app PRIVATE src/main.c)
+2
View File
@@ -0,0 +1,2 @@
CONFIG_ZTEST=y
CONFIG_CUSTOM=y
+42
View File
@@ -0,0 +1,42 @@
/*
* Copyright (c) 2021 Legrand North America, LLC.
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* @file test custom_lib library
*
* This suite verifies that the methods provided with the custom_lib
* library works correctly.
*/
#include <limits.h>
#include <zephyr/ztest.h>
#include <app/lib/custom.h>
ZTEST(custom_lib, test_get_value)
{
/* Verify standard behavior */
zassert_equal(custom_get_value(INT_MIN), INT_MIN,
"get_value failed input of INT_MIN");
zassert_equal(custom_get_value(INT_MIN + 1), INT_MIN + 1,
"get_value failed input of INT_MIN + 1");
zassert_equal(custom_get_value(-1), -1,
"get_value failed input of -1");
zassert_equal(custom_get_value(1), 1,
"get_value failed input of 1");
zassert_equal(custom_get_value(INT_MAX - 1), INT_MAX - 1,
"get_value failed input of INT_MAX - 1");
zassert_equal(custom_get_value(INT_MAX), INT_MAX,
"get_value failed input of INT_MAX");
/* Verify override behavior */
zassert_equal(custom_get_value(0),
CONFIG_CUSTOM_GET_VALUE_DEFAULT,
"get_value failed input of 0");
}
ZTEST_SUITE(custom_lib, NULL, NULL, NULL, NULL, NULL);
+9
View File
@@ -0,0 +1,9 @@
common:
tags: extensibility
integration_platforms:
- custom_plank
- qemu_cortex_m0
tests:
lib.custom: {}
lib.custom.non_default:
extra_args: CONFIG_CUSTOM_GET_VALUE_DEFAULT=6