This command line option allows automake target to be provided as an
override to the target specified in the test build scripts. With this a
partial test can be run for all specified layers rather than a full
distcheck which can be quite slow.
globalResult=0
+action=""
cleanup="no"
verbose="no"
keepGoing="no"
remove_cache_file="true"
while [ $# -ge 1 ]; do
case "$1" in
+ --action)
+ shift
+ action="$1"
+ shift
+ ;;
--cleanup)
cleanup="yes"
shift
buildtest() {
opts=$1
+ action=$2
layer=`basename ${opts} .opts`
btlayer="bt${layer}"
log=${btlayer}.log
result=255
cd ${btlayer}
if test -e $top/test-suite/buildtest.sh ; then
- $top/test-suite/buildtest.sh ${opts} 2>&1
+ $top/test-suite/buildtest.sh "${action}" ${opts} 2>&1
result=$?
elif test -e ../$top/test-suite/buildtest.sh ; then
- ../$top/test-suite/buildtest.sh ../${opts} 2>&1
+ ../$top/test-suite/buildtest.sh "${action}" ../${opts} 2>&1
result=$?
else
echo "Error: cannot find $top/test-suite/buildtest.sh script"
# run the test, if any
if test -n "$cfg"; then
- buildtest $cfg
+ buildtest "$cfg" "$action"
fi
# quit on errors unless we should $keepGoing
# Should be run from the source package root directory with paths relative to there.
#
-config="${1}"
+action="${1}"
+config="${2}"
base="`dirname ${0}`"
# cache_file may be set by environment variable
exit 1;
fi
+# override the layers MAKETEST default
+if test "x${action}" != "x"; then
+ MAKETEST="${action}"
+fi
+
#
# empty all the existing code, reconfigure and builds test code
# but skip if we have no files to remove.