You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2012/07/30 21:58:36 UTC
[9/15] ios commit: Improved bin/test script
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/1e488015
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/1e488015
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/1e488015
Branch: refs/heads/master
Commit: 1e488015bcc832307cd06bb0de35d7c99f2e6270
Parents: 6e7ff96
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Jul 25 18:03:59 2012 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Jul 30 12:52:26 2012 -0700
----------------------------------------------------------------------
bin/test | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/1e488015/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