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
|
|
@ -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