changeset 37:8f662c20a3ec

build: Fix coverage script
author Lewin Bormann <lbo@spheniscida.de>
date Wed, 21 Aug 2019 11:33:56 +0200
parents 97ebaf1119ba
children c74b95dafa53
files coverage.sh src/base/str_test.c
diffstat 2 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/coverage.sh	Wed Aug 21 10:52:11 2019 +0200
+++ b/coverage.sh	Wed Aug 21 11:33:56 2019 +0200
@@ -3,7 +3,7 @@
 # Expects a list of test executables as arguments.
 # Run this from the build directory using `make coverage`.
 
-set -e
+set -ex
 
 KCOV="kcov"
 KCOV_ARGS="--exclude-pattern=/usr/src,/usr/include,/usr/lib,_test.c"
@@ -15,5 +15,5 @@
     $KCOV $KCOV_ARGS . $BINARY
 done
 
-$KCOV --merge --report $KCOV_ARGS . $TESTS_BASENAME
+$KCOV --merge --report-only $KCOV_ARGS . $TESTS
 xdg-open kcov-merged/index.html
--- a/src/base/str_test.c	Wed Aug 21 10:52:11 2019 +0200
+++ b/src/base/str_test.c	Wed Aug 21 11:33:56 2019 +0200
@@ -4,7 +4,7 @@
 #include <stdint.h>
 #include <stdio.h>
 
-void test_inline_string() {
+void test_inline_string(void) {
     ystr_t str, str2;
 
     ystr_init(&str, "short");
@@ -25,7 +25,7 @@
     assert(0 == ystr_len(&str));
 }
 
-void test_str_set_owned() {
+void test_str_set_owned(void) {
     ystr_t str;
     ystr_init(&str, NULL);
 
@@ -43,7 +43,7 @@
     ystr_destroy(&str);
 }
 
-void test_str_set() {
+void test_str_set(void) {
     ystr_t str, str2;
     ystr_init(&str, "ab");
     ystr_init(&str2, "ab");
@@ -53,7 +53,7 @@
     assert(0 == ystr_cmp_str(&str, ""));
 }
 
-void test_str_at() {
+void test_str_at(void) {
     ystr_t s;
     ystr_init(&s, "Hello");
 
@@ -63,7 +63,7 @@
     ystr_destroy(&s);
 }
 
-void test_str_cmp() {
+void test_str_cmp(void) {
     ystr_t s1, s2;
     ystr_init(&s1, "aaaaaaaaaaaaaaaaaaaabc");
     ystr_init(&s2, "aaaaaaaaaaaaaaaaaaaabd");
@@ -74,7 +74,7 @@
     ystr_destroy(&s2);
 }
 
-void test_str_append() {
+void test_str_append(void) {
     ystr_t s1, s2, s3;
     ystr_init(&s1, "xyz");
     ystr_init(&s2, "abcdefghijklmnop");
@@ -100,7 +100,7 @@
     ystr_destroy(&s3);
 }
 
-void test_str_build() {
+void test_str_build(void) {
     ystr_t s1;
     ystr_init(&s1, "xyz");
 
@@ -127,7 +127,7 @@
     ystr_destroy(&s1);
 }
 
-void test_string_split() {
+void test_string_split(void) {
     ystr_t str;
     yvec_t parts;
     ystr_init(&str, "hello,world,this,is,me");
@@ -145,7 +145,7 @@
     yvec_destroy(&parts);
 }
 
-void test_string_resize() {
+void test_string_resize(void) {
     ystr_t s;
     ystr_init(&s, "hello");