Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not allow clearing Android logs if the emulator is not running #21578

Merged
merged 10 commits into from
Aug 22, 2024

Conversation

jchen351
Copy link
Contributor

Description

Do not allow clearing Android logs if the emulator is not running

Motivation and Context

Previously the Clearing Android logs step stuck until the pipeline timeout. If one of the previous steps failed.

@jchen351 jchen351 requested a review from edgchen1 July 31, 2024 17:47
tools/python/run_adb.py Outdated Show resolved Hide resolved
@edgchen1
Copy link
Contributor

edgchen1 commented Aug 8, 2024

alternatively, could first check if the emulator has started in the yaml template. then we can keep emulator-specific stuff out of run_adb.py.

e.g., we could check for the existence of $(Build.BinariesDirectory)/emulator.pid in these steps:

- task: CmdLine@2
inputs:
script: |
python3 tools/python/run_adb.py logcat --clear
displayName: "Clear Android logs"
condition: succeededOrFailed()
- ${{ parameters.steps }}
- task: CmdLine@2
inputs:
script: |
python3 tools/python/run_adb.py logcat -d
displayName: "Dump Android logs"
condition: succeededOrFailed()

@jchen351 jchen351 requested a review from a team as a code owner August 9, 2024 00:27
@jchen351 jchen351 merged commit 6c1a3f8 into main Aug 22, 2024
92 of 93 checks passed
@jchen351 jchen351 deleted the Cjian/emu branch August 22, 2024 17:18
skottmckay pushed a commit that referenced this pull request Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants