fix running the testsuite from the build tree

This commit is contained in:
mrg 2015-12-27 07:43:39 +00:00
parent bc9ef90a7d
commit 71e7babf6d
2 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@ BIGFILETESTS= partial4000 partial8000
BOZOHTTPD?= ../bozohttpd
BOZOHTTPD?= ../debug/bozohttpd-debug
WGET?= wget
DATA?= $(.CURDIR)/data
all:
clean:
@ -19,14 +19,14 @@ check: check-simple check-bigfile
check-simple:
.for a in $(SIMPLETESTS)
echo "Running test $a"
$(BOZOHTTPD) ./data < $(.CURDIR)/$a.in > tmp.$a.out || true
$(BOZOHTTPD) "$(DATA)" < $(.CURDIR)/$a.in > tmp.$a.out || true
$(.CURDIR)/html_cmp $(.CURDIR)/$a.out tmp.$a.out
.endfor
check-bigfile:
.for a in $(BIGFILETESTS)
echo "Running test $a"
$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "./data"
$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "$(DATA)"
.endfor
.include <bsd.obj.mk>

View File

@ -8,7 +8,7 @@ datadir="$4"
bozotestport=11111
# copy beginning file
cp ./data/bigfile.${test} ./bigfile
cp ${datadir}/bigfile.${test} ./bigfile
# fire up bozohttpd
${bozohttpd} -b -b -I ${bozotestport} -n -s -f ${datadir} &
@ -18,7 +18,7 @@ ${wget} -c http://localhost:${bozotestport}/bigfile
kill -9 $bozopid
if cmp ./bigfile ./data/bigfile; then
if cmp ./bigfile ${datadir}/bigfile; then
rm -f ./bigfile
exit 0
else