script to build coverage test and do a quick run - webdump_tests - Testfiles for webdump
(HTM) git clone git://git.codemadness.org/webdump_tests
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit d34f3c8b1565c1f0eaec2b0c1a5102a7c63ebb68
(DIR) parent ea8fcd01c0941b87385d75914888b19e3decc356
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 14 Sep 2023 22:26:15 +0200
script to build coverage test and do a quick run
Diffstat:
A build_coverage.sh | 13 +++++++++++++
A run_coverage.sh | 23 +++++++++++++++++++++++
2 files changed, 36 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/build_coverage.sh b/build_coverage.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+# NOTE: make sure to disable pledge on OpenBSD, gcov needs rpath.
+
+rm -f *.gcov *.gcda *.gcno
+
+#header="$(readlink -f "$0")"
+#header="$(dirname "$header")/gcov_dump.h"
+
+make clean
+make \
+ CC="gcc" \
+ CFLAGS="-fprofile-arcs -ftest-coverage" \
+ LDFLAGS="-fprofile-arcs"
(DIR) diff --git a/run_coverage.sh b/run_coverage.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+bin="$HOME/p/webdump/webdump"
+
+# must be an absolute URI
+echo | "$bin" -b invalid
+
+for f in realworld/* tests/*; do
+ "$bin" -r < "$f" || exit $?
+ "$bin" -b 'http://example.com' -r < "$f" || exit $?
+ "$bin" -l -i -b 'http://example.com' -r < "$f" || exit $?
+ "$bin" -a -l -i -b 'http://example.com' -r < "$f" || exit $?
+ "$bin" -a -l -i -b 'http://example.com' < "$f" || exit $?
+ "$bin" -a -I -l -i -b 'http://example.com' < "$f" || exit $?
+ "$bin" -8 -a -I -l -i -b 'http://example.com' < "$f" || exit $?
+ "$bin" -8 -d -a -I -l -i -b 'http://example.com' < "$f" || exit $?
+
+ "$bin" -s 'main' -a -l -i -b 'http://example.com' < "$f" || exit $?
+ "$bin" -s 'main.class' -a -l -i -b 'http://example.com' < "$f" || exit $?
+ "$bin" -s 'main#id' -a -l -i -b 'http://example.com' < "$f" || exit $?
+ "$bin" -s 'main@1' -a -l -i -b 'http://example.com' < "$f" || exit $?
+ "$bin" -s 'a, td' -a -l -i -b 'http://example.com' < "$f" || exit $?
+ "$bin" -s 'a,td' -a -l -i -b 'http://example.com' < "$f" || exit $?
+done