Commit c9573a40 authored by Aneta Steimarova's avatar Aneta Steimarova

#691 Problem with device with no SD card/rights to SD card solved

parent 80ecf0a6
......@@ -345,8 +345,7 @@ String androidITestBundle(String device){
}
if (testsCount != successfulTestsCount){
def failLogs = testsCount - successfulTestsCount
println "[iTest-" + device + "] " + failLogs + "OF TESTS ON THIS DEVICE FINISHED WITH STATUS FAIL!"
println "[iTest-" + device + "] ONE OR MORE OF TESTS ON THIS DEVICE FINISHED WITH STATUS FAIL!"
return "[iTest-" + device + "] Failed to complete all iTests! Check iTest log files in: " + iTestOutputFile.toString() + "/iTest_results/\n"
}
else{
......@@ -374,7 +373,16 @@ task runAndroidITestBundle (dependsOn:'assembleITest'){
}
def device = line.substring(0, i)
println "Connected device: " + device
exceptions += androidITestBundle(device)
def adbLsOut = new ByteArrayOutputStream()
exec {
commandLine "$adb", '-s', device, 'shell', 'ls'
standardOutput = adbLsOut
}
if(adbLsOut.toString().contains("error")){
exceptions += "[iTest-" + device + "] Device does not meet requirements for running tests. Try to check out if device has SD card and SD card is accessible from computer."
println "[iTest-" + device + "] THIS DEVICE DOES NOT MEET REQUIREMENTS FOR RUNNING TESTS."
}
else exceptions += androidITestBundle(device)
}
}
if(connectedDevices<1) throw new GradleException("NO CONNECTED DEVICE WAS FOUND!")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment