Bug 999071 - Empty ANR file during testing instead of deleting it; r=gbrown

This commit is contained in:
Jim Chen 2014-04-28 22:20:52 -04:00
Родитель e8ad92a6ac
Коммит 123716de41
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -98,10 +98,12 @@ class RemoteAutomation(Automation):
return status
def deleteANRs(self):
# delete ANR traces.txt file; usually need root permissions
# empty ANR traces.txt file; usually need root permissions
# we make it empty and writable so we can test the ANR reporter later
traces = "/data/anr/traces.txt"
try:
self._devicemanager.shellCheckOutput(['rm', traces], root=True)
self._devicemanager.shellCheckOutput(['echo', '', '>', traces], root=True)
self._devicemanager.shellCheckOutput(['chmod', '666', traces], root=True)
except DMError:
print "Error deleting %s" % traces
pass