tests: move crc 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:51:40 -04:00
commit abf1d36ed9
5 changed files with 11 additions and 9 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 +0,0 @@
CONFIG_ZTEST=y

View file

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

View file

@ -6,6 +6,11 @@
#include <ztest.h> #include <ztest.h>
#include <sys/crc.h> #include <sys/crc.h>
#include "../../../lib/os/crc8_sw.c"
#include "../../../lib/os/crc16_sw.c"
#include "../../../lib/os/crc32_sw.c"
#include "../../../lib/os/crc7_sw.c"
void test_crc32_ieee(void) void test_crc32_ieee(void)
{ {

View file

@ -1,3 +1,4 @@
tests: tests:
misc.crc: misc.crc:
tags: net crc tags: net crc
type: unit