Schedule resource depletion tpkg's sequentually

This commit is contained in:
Willem Toorop 2017-05-10 23:01:57 +02:00
parent b2d09e0171
commit 760b813333
4 changed files with 34 additions and 18 deletions

View File

@ -17,4 +17,4 @@ addons:
script:
- mkdir tests
- cd tests
- ../src/test/tpkg/run-all.sh
- ../src/test/tpkg/run-parallel.sh

View File

@ -3,7 +3,7 @@ Version: 1.0
Description: Test if outstanding queries setting is obeyed
CreationDate: Tue Mar 14 10:43:45 CET 2017
Maintainer: Willem Toorop
Category:
Category: Resource depletion
Component:
CmdDepends:
Depends: 210-stub-only-link.tpkg

View File

@ -3,7 +3,7 @@ Version: 1.0
Description: Test if outstanding queries setting is obeyed
CreationDate: ma 20 mrt 2017 15:17:45 CET
Maintainer: Willem Toorop
Category:
Category: Resource depletion
Component:
CmdDepends:
Depends: 210-stub-only-link.tpkg

View File

@ -11,29 +11,45 @@ retry:
MAKEFILE_HEADER
# Resource depletion tests should be performed one-by-one after all
# other tests have been done.
#
RD_TESTS=""
OTHERS=""
ALL="results:"
for TEST_PKG in ${SRCDIR}/*.tpkg
for TEST_PKG in `echo ${SRCDIR}/*.tpkg | xargs -n1 echo | sort`
do
P=${TEST_PKG#${SRCDIR}/}
P=${P%.tpkg}
DONE="result.$P"
ALL="$ALL $DONE"
P="${TEST_PKG#${SRCDIR}/}"
P="${P%.tpkg}"
R="result.${P}"
ALL="${ALL} ${R}"
if grep -q 'Category:.*Resource depletion' "${TEST_PKG}/${P}.dsc"
then
RD_TESTS="${R} ${RD_TESTS}"
else
OTHERS="${OTHERS} ${R}"
fi
done
echo $ALL >> Makefile
echo "${ALL}" >> Makefile
printf '\t"%s" r\n\n' "${TPKG}" >> Makefile
printf 'clean:\n\t"%s" clean\n\trm -fr build build-stub-only build-event-loops build-static-analysis install scan-build-reports .tpkg.var.master *.info\n\n' "${TPKG}" >> Makefile
for TEST_PKG in ${SRCDIR}/*.tpkg
for P in ${OTHERS}
do
P=${TEST_PKG#${SRCDIR}/}
P=${P%.tpkg}
DONE="result.$P:"
P="${P#result.}"
TEST_PKG="${SRCDIR}/${P}.tpkg"
DEPS="result.${P}:"
for D in `grep "^Depends: " "${TEST_PKG}/${P}.dsc" | sed 's/^Depends: //g'`
do
D=${D%.tpkg}
DONE="$DONE result.$D"
D="${D%.tpkg}"
DEPS="${DEPS} result.${D}"
done
echo $DONE >> Makefile
echo "${DEPS}" >> Makefile
printf '\t"%s" %s exe "%s"\n\n' "${TPKG}" "$*" "${TEST_PKG}" >> Makefile
echo "" >> Makefile
done
make -j 2
for RD in ${RD_TESTS}
do
RD_TESTS="${RD_TESTS#$RD }"
TEST_PKG="${RD#result.}"
printf '%s: %s %s\n\t"%s" %s exe "%s/%s.tpkg"\n\n' "${RD}" "${OTHERS}" "${RD_TESTS}" "${TPKG}" "$*" "${SRCDIR}" "${TEST_PKG}" >> Makefile
done
#make -j 2