| commit | d138393640d00ad9ba78d8ccb9caee834ca7918f | [log] [tgz] |
|---|---|---|
| author | Pavan Kumar Juturu <jpavankumar@fuchsia.infra.roller.google.com> | Tue Jun 25 01:47:03 2024 +0000 |
| committer | Copybara-Service <copybara-worker@google.com> | Mon Jun 24 18:48:52 2024 -0700 |
| tree | 1035721eb36721eaa6e1beaf772452fe0a30cf6e | |
| parent | a8bac6c5804c722a60b83cba278ca2114c2071f5 [diff] |
[roll] Roll fuchsia [Honeydew] Create host_shell.run() and decorators.liveness_check()
* host_shell.run() will run the shell commands on host using subprocess
module. This method can be used in rest of Honeydew where we run shell
commands (such as in ffx.py, fastboot.py). One notable difference in
this method compared to existing subprocess calls in Honeydew is,
default timeout value is not set (set to None)
* decorators.liveness_check() decorator will print a liveness message
until the function it is decorated to has been completed
Both these methods will help eliminate majority of timeouts in Honeydew
Example usage of liveness_check decorator:
****************************************************
In [2]:
...: @liveness_check
...: def foo():
...: return True
...:
...: @liveness_check
...: def bar():
...: time.sleep(25)
...: return True
In [3]: foo()
DEBUG:__main__:[Liveness Check]: Starting a new process to track the liveness of 'foo(args=(), kwargs={})'
DEBUG:__main__:[Liveness Check]: Running 'foo(args=(), kwargs={})'...
DEBUG:__main__:[Liveness Check]: Stopping the process that was created to track the liveness of 'foo(args=(), kwargs={})'
DEBUG:__main__:[Liveness Check]: 'foo(args=(), kwargs={})' has been completed.
Out[3]: True
In [4]: bar()
DEBUG:__main__:[Liveness Check]: Starting a new process to track the liveness of 'bar(args=(), kwargs={})'
DEBUG:__main__:[Liveness Check]: Running 'bar(args=(), kwargs={})'...
INFO:__main__:[Liveness Check]: Still waiting on 'bar(args=(), kwargs={})' operation to finish
INFO:__main__:[Liveness Check]: Still waiting on 'bar(args=(), kwargs={})' operation to finish
DEBUG:__main__:[Liveness Check]: Stopping the process that was created to track the liveness of 'bar(args=(), kwargs={})'
INFO:__main__:[Liveness Check]: 'bar(args=(), kwargs={})' has been completed.
Out[4]: True
****************************************************
BUG: b/347778716, b/332538317
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1065834
Original-Revision: 967c96ede35639a3480a77cfc49931de64bd01f9
GitOrigin-RevId: e9e620ba7ab8c928b418a1216a82f5f9631216f0
Change-Id: I73a48ec53be7c76ae5cc5a3a20403760bbc932ce
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party.