Issue#100 Save Logcat logs into file and upload Artifact
This commit is contained in:
parent
3d787b37aa
commit
0ca1d7d9c8
2 changed files with 14 additions and 5 deletions
7
.github/workflows/pull-request-jobs.yml
vendored
7
.github/workflows/pull-request-jobs.yml
vendored
|
|
@ -131,3 +131,10 @@ jobs:
|
|||
name: Emulator-Test-Results-${{ matrix.api-level }}
|
||||
path: ./**/build/testscreenshots/*
|
||||
retention-days: 1
|
||||
- name: Upload Logcat Logs
|
||||
uses: actions/upload-artifact@v2
|
||||
if: always()
|
||||
with:
|
||||
name: Emulator-Logcat-Logs-${{ matrix.api-level }}
|
||||
path: ./**/build/logcat.txt
|
||||
retention-days: 1
|
||||
|
|
@ -98,12 +98,14 @@ task removeLocalScreenshots(type: Delete) {
|
|||
delete files("$savePath")
|
||||
}
|
||||
|
||||
task showLogcat(type: Exec) {
|
||||
task saveLogcatLogs(type: Exec) {
|
||||
group = 'Test-Screenshots'
|
||||
description = 'Show Logcat'
|
||||
|
||||
//adb logcat -d
|
||||
commandLine "$adb", 'logcat', '-d'
|
||||
doFirst {
|
||||
standardOutput = new FileOutputStream("${buildDir}/logcat.txt")
|
||||
}
|
||||
commandLine "$adb", 'logcat', '-d'
|
||||
}
|
||||
|
||||
task hasScreenshots(type: Exec) {
|
||||
|
|
@ -111,7 +113,7 @@ task hasScreenshots(type: Exec) {
|
|||
}
|
||||
|
||||
afterEvaluate {
|
||||
connectedDebugAndroidTest.finalizedBy showLogcat
|
||||
showLogcat.finalizedBy pullScreenshots
|
||||
connectedDebugAndroidTest.finalizedBy saveLogcatLogs
|
||||
saveLogcatLogs.finalizedBy pullScreenshots
|
||||
clean.dependsOn(removeLocalScreenshots)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue