From 9868ee5b5c10d4c431fc91c00d41c070447a589a Mon Sep 17 00:00:00 2001 From: Erjan Gavalji Date: Fri, 9 Oct 2015 17:52:31 +0300 Subject: [PATCH] Add a windows-counterpart of the runner --- win-runtestsapp.sh | 71 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 win-runtestsapp.sh diff --git a/win-runtestsapp.sh b/win-runtestsapp.sh new file mode 100644 index 000000000..1e7a24ea8 --- /dev/null +++ b/win-runtestsapp.sh @@ -0,0 +1,71 @@ +workingdir=__TESTSAPP__ +startdir=$(pwd) +rm -rd $workingdir +mkdir $workingdir +cd $workingdir + +#android create avd -t "android-21" -n Api21 -b "default/x86" + +#if [ 1 == 2 ] ; then + echo "------------------------------------------------" + echo "Killing the emulator..." +# time pkill ".*emulator64-x86" && true + + echo "------------------------------------------------" + echo "Starting the emulator..." + #time emulator -avd Api19 -no-skin -no-audio & # -gpu on + time emulator -avd Api19 -no-audio & # -gpu on + #emulator -avd Api19 -no-skin -no-audio -no-window & + + echo "------------------------------------------------" + echo "Creating the app..." + time tns create TestsApp + cd TestsApp + + echo "------------------------------------------------" + echo "Removing the original template files..." + time rm app/*.* + + echo "------------------------------------------------" + echo "Copying the test app files..." + time cp -r ../../bin/dist/apps/tests/* ./app/ + + echo "------------------------------------------------" + echo "Adding the android platform..." + time tns platform add android #--frameworkPath=/Users/erjan/tns-android.tgz + + # #DO THE REPLACEMENTS IN THE Info.plist and AndroidManifest.xml + cp /Users/erjan/work/spikes/__DEL__/AndroidManifest.xml platforms/android/src/main/ + + echo "------------------------------------------------" + echo "Building the application..." + time tns build android + + echo "------------------------------------------------" + echo "Killing the adb server..." + time adb kill-server + + echo "------------------------------------------------" + echo "Starting the adb server..." + time adb start-server + +#fi + +echo "------------------------------------------------" +echo "Uninstalling the app..." +time adb uninstall org.nativescript.TestsApp + +echo "------------------------------------------------" +echo "Installing the app..." +time adb install ./platforms/android/build/outputs/apk/TestsApp-debug.apk + +echo "------------------------------------------------" +echo "Starting the app..." +time adb shell am start -n org.nativescript.TestsApp/com.tns.NativeScriptActivity + +cd $startdir + +echo "------------------------------------------------" +echo "Waiting for the tests to finish executing..." +adb logcat +