diff options
author | Minghao Li <minghaoli@google.com> | 2024-04-11 22:50:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-11 22:50:59 +0800 |
commit | 07f0a24e8d1b6d568d8e7d26eea28f0608c49322 (patch) | |
tree | 7868d71649705c928154e0bc47258ca0acf4cf7d | |
parent | c2810ee01db3ce5a44a1e89ce7faadb733f22e82 (diff) | |
download | mobly-upstream-master.tar.gz |
Log each command execution result in utils.run_command (#917)upstream-master
-rw-r--r-- | mobly/controllers/android_device_lib/adb.py | 7 | ||||
-rw-r--r-- | mobly/utils.py | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/mobly/controllers/android_device_lib/adb.py b/mobly/controllers/android_device_lib/adb.py index 721dcc7..d5af14f 100644 --- a/mobly/controllers/android_device_lib/adb.py +++ b/mobly/controllers/android_device_lib/adb.py @@ -198,13 +198,6 @@ class AdbProxy: if stderr: stderr.write(err) - logging.debug( - 'cmd: %s, stdout: %s, stderr: %s, ret: %s', - utils.cli_cmd_to_string(args), - out, - err, - ret, - ) if ret == 0: return out else: diff --git a/mobly/utils.py b/mobly/utils.py index c0a1cdf..66f0b50 100644 --- a/mobly/utils.py +++ b/mobly/utils.py @@ -499,6 +499,13 @@ def run_command( raise subprocess.TimeoutExpired( cmd=cmd, timeout=timeout, output=out, stderr=err ) + logging.debug( + 'cmd: %s, stdout: %s, stderr: %s, ret: %s', + cli_cmd_to_string(cmd), + out, + err, + process.returncode, + ) return process.returncode, out, err |