First version of a test scripts that starts the emulator and runs all tests
This commit is contained in:
parent
0b82433320
commit
72c75b4dae
|
@ -10,3 +10,5 @@ RELEASE_KEY=
|
||||||
# The path to your Android SDK
|
# The path to your Android SDK
|
||||||
ANDROID_SDK=
|
ANDROID_SDK=
|
||||||
|
|
||||||
|
# The AVD for running the unit and scenario tests
|
||||||
|
AVD_TEST=
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
###
|
||||||
|
# Run all unit and scenario tests
|
||||||
|
#
|
||||||
|
# TODO:
|
||||||
|
# - Build new version of Yaaic and Tests
|
||||||
|
# - Start device with -wipe-data
|
||||||
|
# - Deploy both APKs to device
|
||||||
|
#
|
||||||
|
|
||||||
|
if [ ! -f build.conf ]; then
|
||||||
|
echo "Config file missing: build.conf"
|
||||||
|
echo "Modify the build.conf.sample file and save it as build.conf"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
. build.conf
|
||||||
|
|
||||||
|
echo "Starting emulator"
|
||||||
|
"$ANDROID_SDK"tools/emulator -avd "$AVD_TEST" &
|
||||||
|
|
||||||
|
sleep 35
|
||||||
|
|
||||||
|
echo "Unlocking emulator"
|
||||||
|
echo "event send EV_KEY:KEY_MENU:1 EV_KEY:KEY_MENU:0" | telnet localhost 5554
|
||||||
|
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
echo "Running tests"
|
||||||
|
"$ANDROID_SDK"tools/adb -e shell "am instrument -w org.yaaic.test/android.test.InstrumentationTestRunner"
|
||||||
|
|
||||||
|
sleep 3
|
||||||
|
|
||||||
|
echo "Killing emulator"
|
||||||
|
kill $(jobs -p)
|
||||||
|
|
Loading…
Reference in New Issue