Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. #!/usr/bin/bash
  2. uninstall ()
  3. {
  4. echo "$device : uninstalling the app..."
  5. adb -s $device uninstall "fr.inria.es.electrosmart.debug"
  6. }
  7. install_app ()
  8. {
  9. echo "$device : installing the app..."
  10. adb -s $device install -r /run/netsop/u/sop-nas2a/vol/home_diana/nagarwal/StudioProjects/es-android/app/build/outputs/apk/app-debug.apk
  11. }
  12. install_tests ()
  13. {
  14. echo "$device : installing the tests..."
  15. 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
  16. }
  17. run_tests ()
  18. {
  19. echo "$device : running the tests..."
  20. 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
  21. }
  22.  
  23. adb devices | while read line
  24. do
  25. if [ ! "$line" = "" ] && [ `echo $line | awk '{print $2}'` = "device" ]
  26. then
  27. device=`echo $line | awk '{print $1}'`
  28. echo "$device $@ ..."
  29. uninstall
  30. install_app
  31. install_tests
  32. run_tests
  33. fi
  34. done
  35.  
  36. adb devices | while read device label _; do
  37. if test "$label" = device; then
  38. echo "$device $@ ..."
  39. uninstall
  40. install_app
  41. install_tests
  42. run_tests
  43. fi <&-
  44. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement