From 9fe3ed4fc179f39de7f932ea37156f085846c8e6 Mon Sep 17 00:00:00 2001 From: Emil Mikulic Date: Fri, 14 Mar 2014 22:50:44 +1100 Subject: [PATCH] Run test_make_safe_uri. Retire broken run-tests.sh --- devel/cover | 10 +++++++++- run-tests.sh | 7 ------- 2 files changed, 9 insertions(+), 8 deletions(-) delete mode 100755 run-tests.sh diff --git a/devel/cover b/devel/cover index b431d24..1d47ed5 100755 --- a/devel/cover +++ b/devel/cover @@ -5,6 +5,7 @@ cd $(dirname $0) DIR=tmp.httpd.tests PORT=12346 +CC=gcc if [ ! -e test.py ]; then echo "can't find test.py, aborting" >&2 @@ -12,7 +13,7 @@ if [ ! -e test.py ]; then fi if [ \( ! -x a.out \) -o \( ../darkhttpd.c -nt a.out \) ]; then echo "===> building a.out, darkhttpd.gcno" - gcc -g -fprofile-arcs -ftest-coverage ../darkhttpd.c || exit 1 + $CC -g -O2 -fprofile-arcs -ftest-coverage ../darkhttpd.c || exit 1 fi if [ -e $DIR ]; then rm -rf $DIR || exit 1 @@ -20,6 +21,13 @@ fi mkdir $DIR || exit 1 rm -f darkhttpd.gcda darkhttpd.log +echo "===> test_make_safe_uri" +$CC -g -O2 test_make_safe_uri.c -o test_make_safe_uri || exit 1 +if ./test_make_safe_uri | egrep '^FAIL:'; then + echo test_make_safe_uri failed >&2 + exit 1 +fi + echo "===> run usage statement" ./a.out >/dev/null diff --git a/run-tests.sh b/run-tests.sh deleted file mode 100755 index 3c53a99..0000000 --- a/run-tests.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -BDECFLAGS="-W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align \ --Wcast-qual -Wchar-subscripts -Winline -Wmissing-prototypes -Wnested-externs \ --Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings" - -(cc $BDECFLAGS -g -O -DDEBUG test_make_safe_uri.c -o test_make_safe_uri && -./test_make_safe_uri)