mozilla-b2g/fxos-certsuite — pull request #161 by armenzg (2014-07-22 19:50:47+00:00)
Title: Bug 996320 - Check that root access is available before running

Running shell() with root=True regardless of the command will raise an exception.
This will help make it clear that the device is not rooted.

if root and not self._haveRootShell and not self._haveSu:
raise DMError("Shell command '%s' requested to run as root but root "
"is not available on this device. Root your device or "
"refactor the test/harness to not require root." %
self._escapedCommandLine(cmd))

http://hg.mozilla.org/mozilla-central/file/default/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py#l91