mirror of
https://github.com/openstf/stf
synced 2025-10-04 18:29:17 +02:00
devutil.killProcsByComm() was not falling back to SIGKILL like it should have been. Fixed. Also added a small delay between kill checks.
This commit is contained in:
parent
6893abdb75
commit
0a28757f62
1 changed files with 6 additions and 3 deletions
|
@ -120,7 +120,10 @@ devutil.waitForProcsToDie = function(adb, serial, comm, bin) {
|
||||||
return devutil.listPidsByComm(adb, serial, comm, bin)
|
return devutil.listPidsByComm(adb, serial, comm, bin)
|
||||||
.then(function(pids) {
|
.then(function(pids) {
|
||||||
if (pids.length) {
|
if (pids.length) {
|
||||||
return devutil.waitForProcsToDie(adb, serial, comm, bin)
|
return Promise.delay(100)
|
||||||
|
.then(function() {
|
||||||
|
return devutil.waitForProcsToDie(adb, serial, comm, bin)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -140,8 +143,8 @@ devutil.killProcsByComm = function(adb, serial, comm, bin, mode) {
|
||||||
.then(function() {
|
.then(function() {
|
||||||
return devutil.waitForProcsToDie(adb, serial, comm, bin)
|
return devutil.waitForProcsToDie(adb, serial, comm, bin)
|
||||||
})
|
})
|
||||||
.timeout(1000)
|
.timeout(2000)
|
||||||
.then(function() {
|
.catch(function() {
|
||||||
return devutil.killProcsByComm(adb, serial, comm, bin, -9)
|
return devutil.killProcsByComm(adb, serial, comm, bin, -9)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue