Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/bash
- uninstall ()
- {
- echo "$device : uninstalling the app..."
- adb -s $device uninstall "fr.inria.es.electrosmart.debug"
- }
- install_app ()
- {
- echo "$device : installing the app..."
- adb -s $device install -r /run/netsop/u/sop-nas2a/vol/home_diana/nagarwal/StudioProjects/es-android/app/build/outputs/apk/app-debug.apk
- }
- install_tests ()
- {
- echo "$device : installing the tests..."
- adb -s $device install -r /run/netsop/u/sop-nas2a/vol/home_diana/nagarwal/StudioProjects/es-android/app/build/outputs/apk/app-debug-androidTest.apk
- }
- run_tests ()
- {
- echo "$device : running the tests..."
- adb -s $device shell "am instrument -w -r -e debug false -e class fr.inria.es.electrosmart.activities.TestAgreement fr.inria.es.electrosmart.debug.test/android.support.test.runner.AndroidJUnitRunner" || true
- }
- adb devices | while read line
- do
- if [ ! "$line" = "" ] && [ `echo $line | awk '{print $2}'` = "device" ]
- then
- device=`echo $line | awk '{print $1}'`
- echo "$device $@ ..."
- uninstall
- install_app
- install_tests
- run_tests
- fi
- done
- adb devices | while read device label _; do
- if test "$label" = device; then
- echo "$device $@ ..."
- uninstall
- install_app
- install_tests
- run_tests
- fi <&-
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement