1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-16 05:55:08 -05:00
Yaaic/test.sh

36 lines
709 B
Bash
Raw Normal View History

###
# 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"
2011-03-06 05:49:33 -05:00
"$ANDROID_SDK"/tools/emulator -avd "$AVD_TEST" &
2011-03-06 05:49:33 -05:00
sleep 40
echo "Unlocking emulator"
echo "event send EV_KEY:KEY_MENU:1 EV_KEY:KEY_MENU:0" | telnet localhost 5554
sleep 5
echo "Running tests"
2011-03-06 05:49:33 -05:00
"$ANDROID_SDK"/platform-tools/adb -e shell "am instrument -w org.yaaic.test/android.test.InstrumentationTestRunner"
sleep 3
echo "Killing emulator"
kill $(jobs -p)