diff options
| author | peter <peter@pmikkelsen.com> | 2026-08-20 18:40:58 +0000 |
|---|---|---|
| committer | peter <peter@pmikkelsen.com> | 2026-08-20 18:40:58 +0000 |
| commit | 69ae86ada0f2516e619f516f33599bbf9fe9410e (patch) | |
| tree | 65a5dcabaebfedc31ed41ff248444782a77a1695 | |
| parent | 596c535415d85b81ec0fb53981b05a31167ab8e0 (diff) | |
Include aplwc-repl in the coverage run
FossilOrigin-Name: 4f7329faad5e4dadb6a8cbea007164da2f95af298399b2d1a2899eb478cd030a
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/main.c | 7 | ||||
| -rwxr-xr-x | tools/checkcov | 3 |
3 files changed, 6 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e06a1eb..782aaff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,3 +66,5 @@ foreach(source ${TEST_SOURCES}) target_link_libraries("${test_bin}" PRIVATE common aplwc) add_test(NAME "${name}" COMMAND "${test_bin}") endforeach() + +add_test(NAME "aplwc-repl" COMMAND "aplwc-repl") @@ -2,8 +2,6 @@ #include <stdlib.h> #include <aplwc.h> -#define MEMORY (1024*1024) - int main(void) { @@ -11,19 +9,18 @@ main(void) uint8_t *data; int ret; - data = malloc(MEMORY); + data = malloc(APLWC_MIN_MEM); if(data == NULL){ fprintf(stderr, "Couldn't allocate memory\n"); return 1; } - ret = aplwc_new(&aplwc, data, MEMORY); + ret = aplwc_new(&aplwc, data, APLWC_MIN_MEM); if(ret){ fprintf(stderr, "Couldn't create new aplwc instance: %s\n", aplwc_errstr(aplwc)); return 1; } - ret = aplwc_destroy(aplwc); if(ret){ fprintf(stderr, "Couldn't destroy the aplwc instance: %s\n", aplwc_errstr(aplwc)); diff --git a/tools/checkcov b/tools/checkcov index 6f2775a..32e30d7 100755 --- a/tools/checkcov +++ b/tools/checkcov @@ -5,6 +5,7 @@ cd build/$1 case "$1" in Coverage) rm -rf CMakeFiles/aplwc.dir/src/* + rm -rf CMakeFiles/aplwc-repl.dir/src/* ;; *) ;; @@ -21,7 +22,7 @@ case "$1" in ;; esac -gcov -tg CMakeFiles/aplwc.dir/src/*.gcno | awk ' +gcov -tg CMakeFiles/aplwc.dir/src/*.gcno CMakeFiles/aplwc-repl.dir/src/*.gcno | awk ' BEGIN { FS=":" } |