[React Native] Publish E2E test logs on build failure too. (#16327)

### Description
<!-- Describe your changes. -->

Publish E2E test logs on build failure too.

### 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. -->

Get more information about intermittent test failures.
This commit is contained in:
Edward Chen 2023-06-12 17:56:46 -07:00 committed by GitHub
parent e3e4926d00
commit 4f23577cb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -300,7 +300,7 @@ stages:
- script: |
JEST_JUNIT_OUTPUT_FILE=$(Build.SourcesDirectory)/js/react_native/e2e/android-test-results.xml \
detox test --record-logs all --configuration android.emu.release
detox test --record-logs all --configuration android.emu.release
workingDirectory: '$(Build.SourcesDirectory)/js/react_native/e2e'
displayName: Run React Native Detox Android e2e Tests
@ -333,8 +333,10 @@ stages:
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.SourcesDirectory)/js/react_native/e2e/artifacts'
displayName: Publish React Native Detox E2E test artifacts
artifact: e2e_test_logs
targetPath: '$(Build.SourcesDirectory)/js/react_native/e2e/artifacts'
condition: succeededOrFailed()
displayName: Publish React Native Detox E2E test logs
- script: |
python3 tools/python/run_android_emulator.py \