tests: move base64 to a unit test

Move to a unit test, no need to build this for every platform we have.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2019-09-25 05:40:42 -04:00
commit 48c335486f
5 changed files with 8 additions and 11 deletions

View file

@ -1,8 +0,0 @@
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.13.1)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(base64)
FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})

View file

@ -1,3 +0,0 @@
CONFIG_BASE64=y
CONFIG_ZTEST=y
CONFIG_ZTEST_STACKSIZE=2048

View file

@ -0,0 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
project(base64)
set(SOURCES main.c)
include($ENV{ZEPHYR_BASE}/subsys/testsuite/unittest.cmake)

View file

@ -28,6 +28,8 @@
#include <ztest.h>
#include <sys/base64.h>
#include "../../../lib/os/base64.c"
static const unsigned char base64_test_dec[64] = {
0x24, 0x48, 0x6E, 0x56, 0x87, 0x62, 0x5A, 0xBD,
0xBF, 0x17, 0xD9, 0xA2, 0xC4, 0x17, 0x1A, 0x01,

View file

@ -1,3 +1,4 @@
tests:
libraries.encoding:
tags: base64
type: unit