Allow for tpkg test with configured srcdir

By temporarily moving the configured files aside while building
This commit is contained in:
Willem Toorop 2016-04-28 14:26:29 +02:00
parent 04b3830fb6
commit b12aeb80fb
9 changed files with 106 additions and 4 deletions

View File

@ -9,7 +9,7 @@ CmdDepends:
Depends:
Help:
Pre: 100-compile.pre
Post:
Post: 100-compile.post
Test: 100-compile.test
AuxFiles:
Passed:

View File

@ -0,0 +1,20 @@
# #-- 100-compile.post --#
# source the master var file when it's there
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
[ -f .tpkg.var.test ] && source .tpkg.var.test
for f in `cat restore-srcdir-configure-settings`
do
mv "${SRCROOT}/${f}.build" "${SRCROOT}/${f}"
done

View File

@ -13,6 +13,15 @@ fi
# use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test
echo "" > restore-srcdir-configure-settings
for f in `grep 'CONFIG_[FH][IE][LA][ED][SE]' "${SRCROOT}/configure.ac" | sed -e 's/^.*(\[//g' -e 's/\])//g'`
do
if [ -f "${SRCROOT}/$f" ]
then
mv "${SRCROOT}/${f}" "${SRCROOT}/${f}.build" && \
echo "$f" >> restore-srcdir-configure-settings
fi
done
rm -fr "${BUILDDIR}/build"
mkdir "${BUILDDIR}/build"
cd "${BUILDDIR}/build"

View File

@ -9,7 +9,7 @@ CmdDepends:
Depends:
Help:
Pre: 200-stub-only-compile.pre
Post:
Post: 200-stub-only-compile.post
Test: 200-stub-only-compile.test
AuxFiles:
Passed:

View File

@ -0,0 +1,20 @@
# #-- 200-stub-only-compile.post --#
# source the master var file when it's there
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
[ -f .tpkg.var.test ] && source .tpkg.var.test
for f in `cat restore-srcdir-configure-settings`
do
mv "${SRCROOT}/${f}.build-stub-only" "${SRCROOT}/${f}"
done

View File

@ -13,6 +13,15 @@ fi
# use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test
echo "" > restore-srcdir-configure-settings
for f in `grep 'CONFIG_[FH][IE][LA][ED][SE]' "${SRCROOT}/configure.ac" | sed -e 's/^.*(\[//g' -e 's/\])//g'`
do
if [ -f "${SRCROOT}/$f" ]
then
mv "${SRCROOT}/${f}" "${SRCROOT}/${f}.build-stub-only" && \
echo "$f" >> restore-srcdir-configure-settings
fi
done
rm -fr "${BUILDDIR}/build-stub-only"
mkdir "${BUILDDIR}/build-stub-only"
cd "${BUILDDIR}/build-stub-only"

View File

@ -8,8 +8,8 @@ Component:
CmdDepends:
Depends: 300-event-loops-configure.tpkg
Help:
Pre:
Post:
Pre: 320-event-loops-compile.pre
Post: 320-event-loops-compile.post
Test: 320-event-loops-compile.test
AuxFiles:
Passed:

View File

@ -0,0 +1,20 @@
# #-- 320-event-loops-compile.post --#
# source the master var file when it's there
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
[ -f .tpkg.var.test ] && source .tpkg.var.test
for f in `cat restore-srcdir-configure-settings`
do
mv "${SRCROOT}/${f}.build-event-loops" "${SRCROOT}/${f}"
done

View File

@ -0,0 +1,24 @@
# #-- 320-event-loops-compile.pre--#
# source the master var file when it's there
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
[ -f .tpkg.var.test ] && source .tpkg.var.test
echo "" > restore-srcdir-configure-settings
for f in `grep 'CONFIG_[FH][IE][LA][ED][SE]' "${SRCROOT}/configure.ac" | sed -e 's/^.*(\[//g' -e 's/\])//g'`
do
if [ -f "${SRCROOT}/$f" ]
then
mv "${SRCROOT}/${f}" "${SRCROOT}/${f}.build-event-loops" && \
echo "$f" >> restore-srcdir-configure-settings
fi
done