mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
Run test_make_safe_uri. Retire broken run-tests.sh
This commit is contained in:
parent
a8bc378777
commit
9fe3ed4fc1
10
devel/cover
10
devel/cover
@ -5,6 +5,7 @@
|
|||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
DIR=tmp.httpd.tests
|
DIR=tmp.httpd.tests
|
||||||
PORT=12346
|
PORT=12346
|
||||||
|
CC=gcc
|
||||||
|
|
||||||
if [ ! -e test.py ]; then
|
if [ ! -e test.py ]; then
|
||||||
echo "can't find test.py, aborting" >&2
|
echo "can't find test.py, aborting" >&2
|
||||||
@ -12,7 +13,7 @@ if [ ! -e test.py ]; then
|
|||||||
fi
|
fi
|
||||||
if [ \( ! -x a.out \) -o \( ../darkhttpd.c -nt a.out \) ]; then
|
if [ \( ! -x a.out \) -o \( ../darkhttpd.c -nt a.out \) ]; then
|
||||||
echo "===> building a.out, darkhttpd.gcno"
|
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
|
fi
|
||||||
if [ -e $DIR ]; then
|
if [ -e $DIR ]; then
|
||||||
rm -rf $DIR || exit 1
|
rm -rf $DIR || exit 1
|
||||||
@ -20,6 +21,13 @@ fi
|
|||||||
mkdir $DIR || exit 1
|
mkdir $DIR || exit 1
|
||||||
rm -f darkhttpd.gcda darkhttpd.log
|
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"
|
echo "===> run usage statement"
|
||||||
./a.out >/dev/null
|
./a.out >/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)
|
|
Loading…
Reference in New Issue
Block a user