Skip to content
This repository was archived by the owner on Sep 27, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions tests/apidemos/__init__.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ Setup Suite

Android SDK Should Exist
[Documentation] simple sanity check to see if %{ANDROID_HOME} was set correctly
File Should Exist %{ANDROID_HOME}/tools/android
File Should Exist %{ANDROID_HOME}${/}tools${/}android

Update Android SDK
Execute %{ANDROID_HOME}/tools/android update sdk -t android-${API_LEVEL} --no-ui
Execute %{ANDROID_HOME}/tools/android update sdk -t addon-google_apis-google-${API_LEVEL} --no-ui
Execute %{ANDROID_HOME}${/}tools${/}android update sdk -t android-${API_LEVEL} --no-ui
Execute %{ANDROID_HOME}${/}tools${/}android update sdk -t addon-google_apis-google-${API_LEVEL} --no-ui

Create Android Virtual Device
Execute echo "no" | %{ANDROID_HOME}/tools/android --silent create avd --name ${EMULATOR_NAME} --force -t android-${API_LEVEL}
Execute echo "no" | %{ANDROID_HOME}${/}tools${/}android --silent create avd --name ${EMULATOR_NAME} --force -t android-${API_LEVEL}

Pull ApiDemos.apk from Device
[Timeout] 5 minutes
Expand All @@ -48,18 +48,18 @@ Pull ApiDemos.apk from Device
Remove File ApiDemos.apk

Wait Until Keyword Succeeds 30 seconds 5 seconds
... Execute %{ANDROID_HOME}/platform-tools/adb pull /data/app/ApiDemos.apk
... Execute %{ANDROID_HOME}${/}platform-tools${/}adb pull /data/app/ApiDemos.apk

Re-Sign ApiDemos.apk with Debug Keystore
File Should Exist ApiDemos.apk
Execute zip -d ApiDemos.apk META-INF/*
Execute echo "android" | jarsigner -verbose -keystore $HOME/.android/debug.keystore ApiDemos.apk androiddebugkey
Execute zip -d ApiDemos.apk META-INF${/}*
Execute echo "android" | jarsigner -verbose -keystore $HOME${/}.android${/}debug.keystore ApiDemos.apk androiddebugkey

Build Instrumentation App
Remove Directory ${EXECDIR}/test_servers/ recursive=True
Remove Directory ${EXECDIR}${/}test_servers${/} recursive=True
Execute calabash-android build ApiDemos.apk

${TEST_SERVERS}= List Directory ${EXECDIR}/test_servers/
${TEST_SERVERS}= List Directory ${EXECDIR}${/}test_servers${/}
Set Global Variable ${TEST_APK} ${TEST_SERVERS[0]}

Install App
Expand All @@ -71,7 +71,7 @@ Install App

Uninstall Application com.example.android.apis.test

Install Application ${EXECDIR}/test_servers/${TEST_APK}
Install Application ${EXECDIR}${/}test_servers${/}${TEST_APK}

Install Application ${EXECDIR}/ApiDemos.apk
Install Application ${EXECDIR}${/}ApiDemos.apk