Skip to content

Commit bff3d7a

Browse files
authored
Bugfix Android emulator test failrues
1 parent 0426070 commit bff3d7a

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

.github/workflows/integration_tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,7 @@ jobs:
812812
run: |
813813
echo "::set-output name=device_type::$( python scripts/gha/print_matrix_configuration.py -d -k ${{ matrix.android_device }} )"
814814
- name: Run Android integration tests on Emulator locally
815+
timeout-minutes: 60
815816
if: steps.get-device-type.outputs.device_type == 'virtual'
816817
run: |
817818
python scripts/gha/test_simulator.py --testapp_dir testapps \
@@ -896,6 +897,7 @@ jobs:
896897
run: |
897898
echo "::set-output name=device_type::$( python scripts/gha/print_matrix_configuration.py -d -k ${{ matrix.ios_device }} )"
898899
- name: Run iOS integration tests on Simulator locally
900+
timeout-minutes: 60
899901
if: steps.get-device-type.outputs.device_type == 'virtual'
900902
run: |
901903
python scripts/gha/test_simulator.py --testapp_dir testapps \
@@ -977,6 +979,7 @@ jobs:
977979
- name: Install python deps
978980
run: pip install -r scripts/gha/requirements.txt
979981
- name: Run tvOS integration tests on Simulator locally
982+
timeout-minutes: 60
980983
run: |
981984
python scripts/gha/test_simulator.py --testapp_dir testapps \
982985
--tvos_device "${{ matrix.tvos_device }}" \

scripts/gha/print_matrix_configuration.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118

119119
EXPANDED_KEY: {
120120
"ssl_lib": ["openssl", "boringssl"],
121-
"android_device": ["android_latest", "android_latest", "emulator_target", "emulator_latest"],
121+
"android_device": ["android_latest", "android_latest", "emulator_target", "emulator_latest", "emulator_32bit"],
122122
"ios_device": ["ios_min", "ios_target", "ios_latest", "simulator_min", "simulator_target", "simulator_latest"],
123123
"tvos_device": ["tvos_simulator"],
124124
}
@@ -156,9 +156,10 @@
156156
"android_min": {"type": "real", "model":"Nexus10", "version":"19"},
157157
"android_target": {"type": "real", "model":"Pixel2", "version":"28"},
158158
"android_latest": {"type": "real", "model":"flame", "version":"29"},
159-
"emulator_min": {"type": "virtual", "image":"system-images;android-18;default;x86"},
159+
"emulator_min": {"type": "virtual", "image":"system-images;android-18;google_apis;x86"},
160160
"emulator_target": {"type": "virtual", "image":"system-images;android-28;google_apis;x86_64"},
161-
"emulator_latest": {"type": "virtual", "image":"system-images;android-29;default;x86"},
161+
"emulator_latest": {"type": "virtual", "image":"system-images;android-30;google_apis;x86_64"},
162+
"emulator_32bit": {"type": "virtual", "image":"system-images;android-30;google_apis;x86"},
162163
"ios_min": {"type": "real", "model":"iphone8", "version":"11.4"},
163164
"ios_target": {"type": "real", "model":"iphone8plus", "version":"12.0"},
164165
"ios_latest": {"type": "real", "model":"iphone11", "version":"13.6"},

scripts/gha/test_simulator.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,14 +493,21 @@ def _setup_android(platform_version, build_tool_version, sdk_id):
493493
os.path.join(android_home, "platform-tools"),
494494
os.path.join(android_home, "build-tools", build_tool_version)]
495495
os.environ["PATH"] += os.pathsep + os.pathsep.join(pathlist)
496-
496+
497497
args = ["sdkmanager",
498498
"emulator", "platform-tools",
499499
"platforms;%s" % platform_version,
500500
"build-tools;%s" % build_tool_version]
501501
logging.info("Install packages: %s", " ".join(args))
502502
subprocess.run(args=args, check=True)
503503

504+
args = ["sdkmanager", "--licenses"]
505+
logging.info("Accept all licenses: %s", " ".join(args))
506+
p_yes = subprocess.Popen(["echo", "yes"], stdout=subprocess.PIPE)
507+
proc = subprocess.Popen(args, stdin=p_yes.stdout, stdout=subprocess.PIPE)
508+
p_yes.stdout.close()
509+
proc.communicate()
510+
504511
args = ["sdkmanager", sdk_id]
505512
logging.info("Download an emulator: %s", " ".join(args))
506513
subprocess.run(args=args, check=True)

0 commit comments

Comments
 (0)