mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-22 00:32:55 +08:00
test fully automated from mobile-spec edge
This commit is contained in:
parent
ffdb240114
commit
1c064b0922
16
README.md
16
README.md
@ -23,7 +23,7 @@ Commands
|
|||||||
./bin/log .............................. starts logging to stdout
|
./bin/log .............................. starts logging to stdout
|
||||||
./bin/test ............................. run mobile-spec
|
./bin/test ............................. run mobile-spec
|
||||||
|
|
||||||
Usage
|
Running the Example Project
|
||||||
|
|
||||||
# start avd (emulator) named 'default'
|
# start avd (emulator) named 'default'
|
||||||
./bin/emulate
|
./bin/emulate
|
||||||
@ -34,6 +34,14 @@ Usage
|
|||||||
# start logging to stdout
|
# start logging to stdout
|
||||||
./bin/log
|
./bin/log
|
||||||
|
|
||||||
|
Running Mobile-Spec
|
||||||
|
|
||||||
|
./bin/test
|
||||||
|
|
||||||
|
Create a new PhoneGap/Android Project
|
||||||
|
|
||||||
|
./bin/create ~/Desktop/myapp com.phonegap.special MyApp
|
||||||
|
|
||||||
Importing a PhoneGap/Android app into Eclipse
|
Importing a PhoneGap/Android app into Eclipse
|
||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
|
|
||||||
@ -70,10 +78,8 @@ Debugging
|
|||||||
|
|
||||||
Attach it to a process on the device
|
Attach it to a process on the device
|
||||||
|
|
||||||
$ adb jdwp
|
adb jdwp
|
||||||
adb forward tcp:8000 jdwp: jdb -attach localhost:8000
|
|
||||||
|
|
||||||
|
|
||||||
For more info see
|
For more info see
|
||||||
-----------------
|
-----------------
|
||||||
- [http://docs.phonegap.com](http://docs.phonegap.com)
|
- [http://docs.phonegap.com](http://docs.phonegap.com)
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
PROJECT_PATH=${1:-"./example"}
|
PROJECT_PATH=${1:-"./example"}
|
||||||
PACKAGE=${2:-"com.phonegap.example"}
|
PACKAGE=${2:-"com.phonegap.example"}
|
||||||
ACTIVITY=${3:-"PhoneGapExample"}
|
ACTIVITY=${3:-"PhoneGapExample"}
|
||||||
ACTIVITY_PATH=$PROJECT_PATH/src/com/phonegap/example/$ACTIVITY.java
|
PACKAGE_AS_PATH=$(echo $PACKAGE | sed 's/\./\//g')
|
||||||
|
ACTIVITY_PATH=$PROJECT_PATH/src/$PACKAGE_AS_PATH/$ACTIVITY.java
|
||||||
TARGET=$(android list targets | grep 'id: ' | sed 's/id: \([0-9]\).*/\1/g' | tail -1)
|
TARGET=$(android list targets | grep 'id: ' | sed 's/id: \([0-9]\).*/\1/g' | tail -1)
|
||||||
VERSION=$(cat ./VERSION)
|
VERSION=$(cat ./VERSION)
|
||||||
|
|
||||||
|
6
bin/test
6
bin/test
@ -11,7 +11,7 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# generate a working proj
|
# generate a working proj
|
||||||
./bin/create ./test
|
./bin/create ./test com.phonegap.test PhoneGapTest
|
||||||
|
|
||||||
# kill the default app and replace it w/ mobile-spec
|
# kill the default app and replace it w/ mobile-spec
|
||||||
rm -rf ./test/assets/www
|
rm -rf ./test/assets/www
|
||||||
@ -19,6 +19,4 @@ mv ./mobile-spec ./test/assets/www
|
|||||||
cp ./framework/assets/www/phonegap-$VERSION.js ./test/assets/www/phoengap-$VERSION.js
|
cp ./framework/assets/www/phonegap-$VERSION.js ./test/assets/www/phoengap-$VERSION.js
|
||||||
|
|
||||||
# build it, launch it and start logging on stdout
|
# build it, launch it and start logging on stdout
|
||||||
cd ./test && ./../bin/debug
|
cd ./test && ./../bin/debug && ./../bin/log
|
||||||
adb shell am start -n com.phonegap.example/com.phonegap.example.PhoneGapExample
|
|
||||||
./../bin/log
|
|
||||||
|
Loading…
Reference in New Issue
Block a user