onnxruntime/tools/python
Scott McKay ae211999dd
Attempt to make the usage of the Android emulator in CIs more robust (#17903)
### Description
<!-- Describe your changes. -->
Android emulator usage updates:
- Change approach to detecting boot has completed
- use `-delay-adb` and a simple command (`ls`) with `wait-for-device` as
the first step
    - this ensures enough startup has occurred for adb to be responsive
- use secondary loop on the python side to check for sys.boot_completed
to be set
- doing the check on the python side provides more feedback and seems to
work well
- make the 'stop' logic more precise by using psutil
- add internal timeout of 20 mins for emulator startup
  - waiting for the CI jobs overall timeout is way too long
- value is hardcoded for now (most CIs startup in under 10 mins) but
could be made configurable if needed

CI updates:
- add template for using the Android emulator
  - update CIs to use template
- reorder React Native CI
- minimize the time the Android emulator or iOS simulator is running by
moving some build steps around
  - don't run both at the same time
- unnecessary and potentially adds significant memory pressure to the
machine
- fix QNN Android emulator CI as much as possible
- now everything works apart from running onnx_test_runner with the QNN
EP

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
Fix inconsistent detection of the emulator boot completing.

---------

Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
2023-10-15 08:42:36 +10:00
..
util Attempt to make the usage of the Android emulator in CIs more robust (#17903) 2023-10-15 08:42:36 +10:00
__init__.py
check_onnx_model_mobile_usability.py
convert_onnx_models_to_ort.py Add ability to create ort format models from training offline utility (#16360) 2023-06-21 18:51:43 -07:00
create_reduced_build_config.py Bump ruff in CI (#15533) 2023-04-17 10:11:44 -07:00
dump_ort_model.py Disable PERF* rules in ruff to allow better readability (#16834) 2023-07-25 15:38:22 -07:00
dump_subgraphs.py [Linter] Bump ruff and remove pylint (#17797) 2023-10-05 21:07:33 -07:00
example_operator_perf_test.py
find_optimizer_opset_version_updates_required.py
gen_contrib_doc.py [Better Engineering] Bump ruff to 0.0.278 and fix new lint errors (#16789) 2023-07-21 12:53:41 -07:00
gen_opkernel_doc.py [Linter] Bump ruff and remove pylint (#17797) 2023-10-05 21:07:33 -07:00
gen_ort_mobile_pkg_doc.py
get_submodules.py
onnx2tfevents.py Disable PERF* rules in ruff to allow better readability (#16834) 2023-07-25 15:38:22 -07:00
onnx_test_data_utils.py Various test infra updates from testing Azure ops with MAUI test app (#17262) 2023-08-27 09:35:00 +10:00
ort_test_dir_utils.py [Linter] Bump ruff and remove pylint (#17797) 2023-10-05 21:07:33 -07:00
PythonTools.md
remove_initializer_from_input.py
run_adb.py
run_android_emulator.py Attempt to make the usage of the Android emulator in CIs more robust (#17903) 2023-10-15 08:42:36 +10:00
run_CIs_for_external_pr.py run_CIs_for_external_pr.py: update required pipelines (#17557) 2023-09-14 21:15:10 -07:00
sparsify_initializers.py [Linter] Bump ruff and remove pylint (#17797) 2023-10-05 21:07:33 -07:00
update_version.py [js] add API that allows to get package version (#16207) 2023-06-09 16:18:53 -07:00