|
| 1 | +workingdir=__TESTSAPP__ |
| 2 | +startdir=$(pwd) |
| 3 | +rm -rd $workingdir |
| 4 | +mkdir $workingdir |
| 5 | +cd $workingdir |
| 6 | + |
| 7 | +#if [ 1 == 2 ] ; then |
| 8 | + echo "------------------------------------------------" |
| 9 | + echo "Killing the emulator..." |
| 10 | + time pkill ".*emulator64-x86" && true |
| 11 | + |
| 12 | + echo "------------------------------------------------" |
| 13 | + echo "Starting the emulator..." |
| 14 | + time emulator -avd Api19 -no-skin -no-audio & |
| 15 | + #emulator -avd Api19 -no-skin -no-audio -no-window & |
| 16 | + |
| 17 | + echo "------------------------------------------------" |
| 18 | + echo "Creating the app..." |
| 19 | + time tns create TestsApp |
| 20 | + cd TestsApp |
| 21 | + |
| 22 | + echo "------------------------------------------------" |
| 23 | + echo "Removing the original template files..." |
| 24 | + time rm app/*.* |
| 25 | + |
| 26 | + echo "------------------------------------------------" |
| 27 | + echo "Copying the test app files..." |
| 28 | + time cp -r ./bin/dist/apps/tests* ./app/ |
| 29 | + |
| 30 | + echo "------------------------------------------------" |
| 31 | + echo "Adding the android platform..." |
| 32 | + time tns platform add android |
| 33 | + # #DO THE REPLACEMENTS IN THE Info.plist and AndroidManifest.xml |
| 34 | + |
| 35 | + echo "------------------------------------------------" |
| 36 | + echo "Building the application..." |
| 37 | + time tns build android |
| 38 | + |
| 39 | + echo "------------------------------------------------" |
| 40 | + echo "Killing the adb server..." |
| 41 | + time adb kill-server |
| 42 | + |
| 43 | + echo "------------------------------------------------" |
| 44 | + echo "Starting the adb server..." |
| 45 | + time adb start-server |
| 46 | + |
| 47 | +#fi |
| 48 | + |
| 49 | +echo "------------------------------------------------" |
| 50 | +echo "Uninstalling the app..." |
| 51 | +time adb uninstall org.nativescript.TestApp |
| 52 | + |
| 53 | +echo "------------------------------------------------" |
| 54 | +echo "Installing the app..." |
| 55 | +time adb install ./platforms/android/build/outputs/apk/TestsApp-debug.apk |
| 56 | + |
| 57 | +echo "------------------------------------------------" |
| 58 | +echo "Starting the app..." |
| 59 | +time adb shell am start -n org.nativescript.TestsApp/com.tns.NativeScriptActivity |
| 60 | + |
| 61 | +cd $startdir |
| 62 | + |
| 63 | +echo "------------------------------------------------" |
| 64 | +echo "Waiting for the tests to finish executing..." |
| 65 | +./expect.exp |
0 commit comments