Skip to content

Commit eb07943

Browse files
Andrew Boieioannisg
authored andcommitted
tests: crc: convert to regular test case
The special 'unittest' target has largely been supersesed by native_posix, and converting this to a regular test will allow us to see code coverage for the CRC functions in our coverage reports. Fixes: #16943 Signed-off-by: Andrew Boie <[email protected]>
1 parent b8d4a77 commit eb07943

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

tests/lib/crc/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
cmake_minimum_required(VERSION 3.13.1)
4+
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
5+
project(base64)
6+
7+
FILE(GLOB app_sources src/*.c)
8+
target_sources(app PRIVATE ${app_sources})

tests/lib/crc/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_ZTEST=y

tests/unit/lib/crc/main.c renamed to tests/lib/crc/src/main.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@
55
*/
66

77
#include <ztest.h>
8-
9-
#include <lib/os/crc32_sw.c>
10-
#include <lib/os/crc16_sw.c>
11-
#include <lib/os/crc8_sw.c>
12-
#include <lib/os/crc7_sw.c>
8+
#include <sys/crc.h>
139

1410
void test_crc32_ieee(void)
1511
{
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
tests:
22
misc.crc:
33
tags: net crc
4-
timeout: 5
5-
type: unit

tests/unit/lib/crc/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)