Bug 1075487 - make get_b2g_pid get the right pid, r=davehunt,mdas

This commit is contained in:
Zac Campbell 2014-10-07 13:11:04 +01:00
Родитель 5dfb7f8f8c
Коммит 36e2a81120
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -27,9 +27,9 @@ def get_dm(marionette=None,**kwargs):
def get_b2g_pid(dm):
b2g_output = dm.shellCheckOutput(['b2g-ps'])
pid_re = re.compile(r"""[\s\S]*root[\s]*([\d]+)[\s]*(?:[\w]*[\s]*){6}/system/b2g/b2g""")
if '/system/b2g/b2g' in b2g_output:
pid = pid_re.match(b2g_output)
pid_re = re.compile(r"""b2g[\s]+0[\s]+root\s+([\d]+).*/system/b2g/b2g""")
pid = pid_re.match(b2g_output)
if pid:
return pid.group(1)