Skip to content

Commit b7704e1

Browse files
committed
Replaced -dns-server flag with /etc/hosts entries in emulator CI scripts
1 parent 7b7ae48 commit b7704e1

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

script/ci-setup-and-run-emulator.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,4 @@ cat "$HOME/.android/avd/${AVD_NAME}.avd/config.ini"
4242
-wipe-data \
4343
-gpu swiftshader_indirect \
4444
-read-only \
45-
-no-metrics \
46-
-dns-server 10.0.2.2 &
45+
-no-metrics &

script/ci-wait-for-emulator.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ adb shell settings put global animator_duration_scale 0
2121
# as we can't use 443 directly for a mock web server.
2222
###################################################################################################
2323
adb root
24+
25+
adb remount
26+
27+
adb shell 'echo "10.0.2.2 fes.flowcrypt.test" >> /system/etc/hosts'
28+
adb shell 'echo "10.0.2.2 fel.flowcrypt.test" >> /system/etc/hosts'
29+
adb shell 'echo "10.0.2.2 fel.localhost" >> /system/etc/hosts'
30+
2431
adb wait-for-device
2532
adb shell 'while [[ "$(getprop sys.boot_completed)" != "1" ]]; do sleep 1; done;'
2633

@@ -59,7 +66,6 @@ for attempt in {1..5}; do
5966

6067
if [[ "$attempt" -eq 5 ]]; then
6168
echo "Emulator can't resolve fes.flowcrypt.test"
62-
echo "Make sure ci-setup-and-run-emulator.sh starts emulator with: -dns-server 10.0.2.2"
6369
exit 1
6470
fi
6571

0 commit comments

Comments
 (0)