-
Notifications
You must be signed in to change notification settings - Fork 992
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NT-2144: Emulator on CI environment (#1341)
- Loading branch information
Showing
10 changed files
with
56 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
echo "Copy configuration to the emulator in order to have a concrete Screen size specified on config.ini" | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
cp $DIR/config.ini ~/.android/avd/Pixel_3a_API_30.avd/config.ini | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
#!/bin/bash | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
if $ANDROID_HOME/tools/android list avd | grep -q Pixel_3a_API_30; then | ||
if android list avd | grep -q Pixel_3a_API_30; then | ||
echo "There is an existing an emulator to run screenshot tests" | ||
exit 0; | ||
fi | ||
|
||
echo "Creating a brand new SDCard..." | ||
rm -rf sdcard.img | ||
$ANDROID_HOME/emulator/mksdcard -l e 1G sdcard.img | ||
echo "SDCard created!" | ||
|
||
echo "Downloading the image to create the emulator..." | ||
echo no | $ANDROID_HOME/tools/bin/sdkmanager "system-images;android-30;google_apis;x86" | ||
echo no | sdkmanager "system-images;android-30;google_apis;x86" | ||
echo "Image downloaded!" | ||
|
||
echo "Creating the emulator to run screenshot tests..." | ||
echo no | $ANDROID_HOME/tools/bin/avdmanager create avd -n Pixel_3a_API_30 -k "system-images;android-30;google_apis;x86" --force --sdcard sdcard.img | ||
echo no | avdmanager create avd -n Pixel_3a_API_30 -k "system-images;android-30;google_apis;x86" | ||
echo "Emulator created!" | ||
|
||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
cp $DIR/config.ini ~/.android/avd/Pixel_3a_API_30.avd/config.ini | ||
cp sdcard.img ~/.android/avd/Pixel_3a_API_30.avd/sdcard.img | ||
cp sdcard.img.qcow2 ~/.android/avd/Pixel_3a_API_30.avd/sdcard.img.qcow2 | ||
$DIR/copy_emulator_configuration.sh |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
#!/bin/bash | ||
|
||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
echo "Specific configuration to avoid Facebook Screenshot library to fail on API devices higher than 27" | ||
$ANDROID_HOME/platform-tools/adb wait-for-device | ||
$ANDROID_HOME/platform-tools/adb shell settings put global hidden_api_policy_p_apps 1 | ||
$ANDROID_HOME/platform-tools/adb shell settings put global hidden_api_policy_pre_p_apps 1 | ||
$ANDROID_HOME/platform-tools/adb shell settings put global hidden_api_policy 1 | ||
|
||
echo "Rebooting emulator to apply the configuration" | ||
$ANDROID_HOME/platform-tools/adb wait-for-device | ||
echo adb shell settings put global hidden_api_policy_p_apps 1 | ||
echo adb shell settings put global hidden_api_policy_pre_p_apps 1 | ||
echo adb shell settings put global hidden_api_policy 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
|
||
echo "Stopping emulator..." | ||
$ANDROID_HOME/platform-tools/adb emu kill | ||
adb emu kill | ||
echo "Emulator stopped!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters