From 71e7babf6d63c480bc8d60dde3822fbe40e8e349 Mon Sep 17 00:00:00 2001 From: mrg Date: Sun, 27 Dec 2015 07:43:39 +0000 Subject: [PATCH] fix running the testsuite from the build tree --- libexec/httpd/testsuite/Makefile | 6 +++--- libexec/httpd/testsuite/test-bigfile | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libexec/httpd/testsuite/Makefile b/libexec/httpd/testsuite/Makefile index 1c64fa0b30f4..4ff216534ded 100644 --- a/libexec/httpd/testsuite/Makefile +++ b/libexec/httpd/testsuite/Makefile @@ -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 diff --git a/libexec/httpd/testsuite/test-bigfile b/libexec/httpd/testsuite/test-bigfile index 0f33dcfc7f89..c01f7a0d03a5 100755 --- a/libexec/httpd/testsuite/test-bigfile +++ b/libexec/httpd/testsuite/test-bigfile @@ -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