Setup test env from individually ran test packages

This commit is contained in:
Willem Toorop 2015-12-11 11:05:52 +01:00
parent aa1c38eb4f
commit c1b4694931
5 changed files with 42 additions and 7 deletions

View File

@ -1,6 +1,15 @@
# #-- 100-compile.pre--# # #-- 100-compile.pre--#
# source the master var file when it's there # source the master var file when it's there
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master if [ -f ../.tpkg.var.master ]
then
source ../.tpkg.var.master
else
(
cd ..
[ -f "${TPKG_SRCDIR}/setup-env.sh" ] \
&& sh "${TPKG_SRCDIR}/setup-env.sh"
) && source ../.tpkg.var.master
fi
# use .tpkg.var.test for in test variable passing # use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test [ -f .tpkg.var.test ] && source .tpkg.var.test

View File

@ -1,6 +1,15 @@
# #-- 200-stub-only-compile.pre--# # #-- 200-stub-only-compile.pre--#
# source the master var file when it's there # source the master var file when it's there
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master if [ -f ../.tpkg.var.master ]
then
source ../.tpkg.var.master
else
(
cd ..
[ -f "${TPKG_SRCDIR}/setup-env.sh" ] \
&& sh "${TPKG_SRCDIR}/setup-env.sh"
) && source ../.tpkg.var.master
fi
# use .tpkg.var.test for in test variable passing # use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test [ -f .tpkg.var.test ] && source .tpkg.var.test

View File

@ -1,6 +1,15 @@
# #-- 300-event-loops-compile.pre--# # #-- 300-event-loops-compile.pre--#
# source the master var file when it's there # source the master var file when it's there
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master if [ -f ../.tpkg.var.master ]
then
source ../.tpkg.var.master
else
(
cd ..
[ -f "${TPKG_SRCDIR}/setup-env.sh" ] \
&& sh "${TPKG_SRCDIR}/setup-env.sh"
) && source ../.tpkg.var.master
fi
# use .tpkg.var.test for in test variable passing # use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test [ -f .tpkg.var.test ] && source .tpkg.var.test

View File

@ -7,6 +7,14 @@ export BUILDDIR=`pwd`
export BUILDROOT=`(cd "${BUILDDIR}/../../.."; pwd)` export BUILDROOT=`(cd "${BUILDDIR}/../../.."; pwd)`
export LIBTOOL="${BUILDROOT}/libtool" export LIBTOOL="${BUILDROOT}/libtool"
if [ ! -f "${SRCROOT}/libtool" ]
then
(cd "${SRCROOT}"; libtoolize -fic)
fi
if [ ! -f "${SRCROOT}/configure" ]
then
(cd "${SRCROOT}"; autoreconf -fi)
fi
if [ -f .tpkg.var.master ] if [ -f .tpkg.var.master ]
then then
cat .tpkg.var.master \ cat .tpkg.var.master \

View File

@ -494,8 +494,8 @@ if [ -z "${archive}" ]; then
fi fi
testname=`basename "${archive}" .tpkg` testname=`basename "${archive}" .tpkg`
testpath=`dirname "${archive}"` export TPKG_SRCDIR=`dirname "${archive}"`
test_pkg="${testpath}/${testname}.tpkg" test_pkg="${TPKG_SRCDIR}/${testname}.tpkg"
dsc_file=$testname.dsc dsc_file=$testname.dsc
if [ -z $testname ]; then if [ -z $testname ]; then
err "[fatal] The test package should have a .tpkg extension. Abort." err "[fatal] The test package should have a .tpkg extension. Abort."
@ -785,8 +785,8 @@ done
# if we depend on another test to that one first and then return # if we depend on another test to that one first and then return
for deptest in ${dsc_depends}; do for deptest in ${dsc_depends}; do
cd .. # go up one dir cd .. # go up one dir
out "[log] executing dependency test: ${testpath}/${deptest}" out "[log] executing dependency test: ${TPKG_SRCDIR}/${deptest}"
${SHELL} $0 "-b ${TPKG_BASE}" exe "${testpath}/${deptest}" ${SHELL} $0 "-b ${TPKG_BASE}" exe "${TPKG_SRCDIR}/${deptest}"
test_result=$? test_result=$?
cd - > /dev/null # back where we belong cd - > /dev/null # back where we belong
if [ $test_result -ne 0 ]; then if [ $test_result -ne 0 ]; then