commit - c06b0686214673e013af04918702703ee7168209
commit + ad9226868f59ae796d2ed191fd26b1841e24a4e8
blob - 2d297d4ecc1513f493280db2419d65de1847dfec
blob + e818022a1e7f3ff0bdbab795230508136a007965
--- regress/Makefile
+++ regress/Makefile
SUBDIR = cmdline delta deltify idset path fetch tog secrets
-.if make(clean)
+.if make(clean) || make(obj)
SUBDIR += gotd gotwebd
.endif
blob - 4db88715c8b4d3fc22695209245f9877c7c310bd
blob + 0c0e27da25fcaf927e8dd93f7ff99e5dd8a77b6c
--- regress/gotwebd/Makefile
+++ regress/gotwebd/Makefile
NOMAN = yes
-NOOBJ=Yes
-
.PHONY: ensure_root prepare_test_env prepare_test_repo start_gotwebd
GOTWEBD_TEST_TMPDIR=/tmp
GOTWEBD_TEST_USER=${GOTWEBD_TEST_USER} \
GOTWEBD_TEST_FCGI=${GOTWEBD_TEST_FCGI} \
PATH=$(GOTWEBD_TEST_USER_HOME)/bin:${PATH} \
- HOME=$(GOTWEBD_TEST_USER_HOME)
+ HOME=$(GOTWEBD_TEST_USER_HOME) \
+ GOTWEBD_TEST_DATA_DIR=${.CURDIR}
ensure_root:
@if [[ `id -u` -ne 0 ]]; then \
prepare_test_repo: prepare_test_env
@su -m ${GOTWEBD_TEST_USER} -c 'env ${GOTWEBD_TEST_ENV} \
- sh ./prepare_test_repo.sh "${GOTWEBD_TEST_CHROOT}"'
+ sh ${.CURDIR}/prepare_test_repo.sh "${GOTWEBD_TEST_CHROOT}"'
start_gotwebd: prepare_test_repo gotwebd_test
@echo 'user "${GOTWEBD_TEST_USER}"' > ${GOTWEBD_TEST_CONF}
test_gotwebd: start_gotwebd
@-$(GOTWEBD_TRAP); su -m ${GOTWEBD_TEST_USER} -c \
- 'env $(GOTWEBD_TEST_ENV) sh ./test_gotwebd.sh'
+ 'env $(GOTWEBD_TEST_ENV) sh ${.CURDIR}/test_gotwebd.sh'
@${GOTWEBD_STOP_CMD} 2>/dev/null
.include <bsd.regress.mk>
blob - d7ef5732c24f80f6d83250e1af12fa4f13c315c9
blob + c118a771e44baf296871ddcfcbb3575f70c9fb82
--- regress/gotwebd/common.sh
+++ regress/gotwebd/common.sh
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-. ../cmdline/common.sh
+. ${GOTWEBD_TEST_DATA_DIR}/../cmdline/common.sh
interpolate()
{
blob - c69f369c8092cbd1911705cfd13c37bb20a570b1
blob + 7271ff360e32258fe78e8b8a7c1bd5c84524d446
--- regress/gotwebd/prepare_test_repo.sh
+++ regress/gotwebd/prepare_test_repo.sh
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-. ./common.sh
+. ${GOTWEBD_TEST_DATA_DIR}/common.sh
make_repo()
{
blob - b73944cea1e14f59a1b3054e5b4967ca262a3f6b
blob + 24e4402ff2c666556548a3e648d711fcfee67d30
--- regress/gotwebd/test_gotwebd.sh
+++ regress/gotwebd/test_gotwebd.sh
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-. ./common.sh
+. ${GOTWEBD_TEST_DATA_DIR}/common.sh
test_gotwebd_action_summary()
{
COMMIT_ID=$id \
COMMIT_ID10=$(printf '%.10s' $id) \
COMMIT_YMDHMS=$(date -u -r $author_time +"%FT%TZ") \
- interpolate action_summary.html > $testroot/content.expected
+ interpolate ${GOTWEBD_TEST_DATA_DIR}/action_summary.html \
+ > $testroot/content.expected
$GOTWEBD_TEST_FCGI > $testroot/content
COMMITTER_EMAIL="flan_hacker@openbsd.org" \
COMMIT_YMDHMS=$(date -u -r $author_time +"%FT%TZ") \
COMMIT_DATE=$(date -u -r $author_time +"%a %b %e %X %Y") \
- interpolate action_diff.html > $testroot/content.expected
+ interpolate ${GOTWEBD_TEST_DATA_DIR}/action_diff.html \
+ > $testroot/content.expected
$GOTWEBD_TEST_FCGI -q "$qs" > $testroot/content
COMMIT_YMD=$(date -u -r $author_time +"%F") \
COMMIT_YMDHMS=$(date -u -r $author_time +"%FT%TZ") \
COMMIT_DATE=$(date -u -r $author_time +"%a %b %e %X %Y") \
- interpolate action_blame.html > $testroot/content.expected
+ interpolate ${GOTWEBD_TEST_DATA_DIR}/action_blame.html \
+ > $testroot/content.expected
$GOTWEBD_TEST_FCGI -q "$qs" > $testroot/content
COMMIT_YMDHMS=$(date -u -r $author_time +"%FT%TZ") \
COMMIT_DATE=$(date -u -r $author_time +"%a %b %e %X %Y") \
TREE_ID=$(got cat -r $repo main | head -1 | cut -d ' ' -f2) \
- interpolate action_tree.html > $testroot/content.expected
+ interpolate ${GOTWEBD_TEST_DATA_DIR}/action_tree.html \
+ > $testroot/content.expected
$GOTWEBD_TEST_FCGI -q "$qs" > $testroot/content
COMMITTER="Flan Hacker" \
COMMITTER_EMAIL="flan_hacker@openbsd.org" \
COMMIT_DATE=$(date -u -r $author_time +"%a %b %e %X %Y") \
- interpolate action_patch.html > $testroot/content.expected
+ interpolate ${GOTWEBD_TEST_DATA_DIR}/action_patch.html \
+ > $testroot/content.expected
$GOTWEBD_TEST_FCGI -q "$qs" > $testroot/content
COMMIT_YMDHMS_HEAD=$(date -u -r $author_time_head +"%FT%TZ") \
COMMIT_DATE_ROOT=$(date -u -r $author_time_root +"%a %b %e %X %Y") \
COMMIT_DATE_HEAD=$(date -u -r $author_time_head +"%a %b %e %X %Y") \
- interpolate action_commits.html > $testroot/content.expected
+ interpolate ${GOTWEBD_TEST_DATA_DIR}/action_commits.html \
+ > $testroot/content.expected
$GOTWEBD_TEST_FCGI -q "$qs" > $testroot/content