Make a screenshot when test fails to help with debugging

This commit is contained in:
Torsten Grote
2021-03-25 13:53:45 -03:00
parent f971533a5b
commit 8a3dd5472b
3 changed files with 73 additions and 0 deletions

View File

@@ -35,12 +35,15 @@ android test:
- start-emulator.sh
# run normal and screenshot tests together (exclude Large tests)
- ./gradlew -Djava.security.egd=file:/dev/urandom connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.notAnnotation=androidx.test.filters.LargeTest
after_script:
- adb pull /sdcard/Pictures/screenshots
artifacts:
name: "${CI_PROJECT_PATH}_${CI_JOB_STAGE}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHA}"
paths:
- kernel.log
- logcat.txt
- briar-android/build/reports/androidTests/connected/flavors/*
- screenshots
expire_in: 3 days
when: on_failure
when: manual