Updated Branches: refs/heads/master 0cd68732e -> e5e208da4
Improved bin/test script Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/e5e208da Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/e5e208da Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/e5e208da Branch: refs/heads/master Commit: e5e208da4eefd786440497f2b2a74a167b8b5ffb Parents: 385122d Author: Shazron Abdullah <shaz...@apache.org> Authored: Wed Jul 25 18:03:59 2012 -0700 Committer: Shazron Abdullah <shaz...@apache.org> Committed: Wed Jul 25 18:03:59 2012 -0700 ---------------------------------------------------------------------- bin/test | 27 ++++++++++++++++++--------- 1 files changed, 18 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/e5e208da/bin/test ---------------------------------------------------------------------- diff --git a/bin/test b/bin/test index 489de66..8aac6c4 100755 --- a/bin/test +++ b/bin/test @@ -20,25 +20,34 @@ # -set -e -VERSION=$(cat ./VERSION) +# the two lines below are to get the current folder, and resolve symlinks +SCRIPT="$0" +# need this for relative symlinks +while [ -h "$SCRIPT" ] ; do + SCRIPT=`readlink "$SCRIPT"` +done + +BINDIR=$( cd "$( dirname "$SCRIPT" )" && pwd ) +TESTDIR=$BINDIR/mobile-spec-test + +echo "TESTDIR" $SCRIPT # get the latest mobile-spec -git clone git://github.com/apache/incubator-cordova-mobile-spec.git +git clone git://github.com/apache/incubator-cordova-mobile-spec.git $BINDIR/mobile-spec # clobber test if it exists -if [ -e ./test ] +if [ -e $TESTDIR ] then - rm -rf ./test + rm -rf $TESTDIR fi # generate a working proj -./bin/create ./test org.apache.cordova.test CordovaTest +$BINDIR/create $TESTDIR org.apache.cordova.test CordovaTest # kill the default app and replace it w/ mobile-spec -rm -rf ./test/assets/www -mv ./mobile-spec ./test/assets/www +rm -rf $TESTDIR/www +mv $BINDIR/mobile-spec $TESTDIR/www # build it, launch it and start logging on stdout -cd ./test && ./cordova/debug && ./cordova/log +$TESTDIR/cordova/debug && $TESTDIR/cordova/log