ndk: handle --verbose option in tests/run-all.sh script

Change-Id: Ib99020a8b5c76c34bcbf8244426221bb3b6d2663
This commit is contained in:
David 'Digit' Turner
2010-07-16 14:31:30 -07:00
parent e551875b2d
commit 6d0ef0df98

View File

@@ -78,6 +78,17 @@ mkdir -p `dirname $MYLOG`
rm -f $MYLOG rm -f $MYLOG
echo "NDK automated tests log file" > $MYLOG echo "NDK automated tests log file" > $MYLOG
if [ "$VERBOSE" = "yes" ] ; then
run ()
{
$NDK/ndk-build -B $JOBS 2>&1
}
else
run ()
{
$NDK/ndk-build -B $JOBS >> $MYLOG 2>&1
}
fi
# #
# Rebuild all samples first # Rebuild all samples first
@@ -86,9 +97,9 @@ build_sample ()
{ {
echo "Building NDK sample: $1" echo "Building NDK sample: $1"
cd $PROGDIR/../samples/$1 cd $PROGDIR/../samples/$1
$NDK/ndk-build -B $JOBS >> $MYLOG 2>&1 run $NDK/ndk-build -B $JOBS
if [ $? != 0 ] ; then if [ $? != 0 ] ; then
echo "!!! BUILD FAILURE !!!" echo "!!! BUILD FAILURE !!! See $MYLOG for details or use --verbose option!"
exit 1 exit 1
fi fi
} }