factory: Clean up: threading.Thread, StartDaemonThread, and RunInBackground |
|||
Issue descriptionCurrently in pytests we have programs doing background thread in 3 different ways: 1. threading.Thread (should be buggy?) 2. process_utils.StartDaemonThread 3. ui.RunInBackground Most pytests should have been replaced by RunInBackground in the clean up or //chromium-review.googlesource.com/431331, but there are still tests left. I think we should add comments if a test can't use RunInBackground; otherwise, fix them. Tests doing threading.Thread: - badblocks - update_firmware - tpm_diagnosis - finalize (?) - touchscreen_calibration (?) - charger - usb.py (should we change RunInBackground to also take a Thread object?) Tests doing StartDaemonThread for ui thing: - flush_testlog - button - battery_cycle - brightness - wait_external - webrtc_camera - display_idle - tablet_rotation - network_setup - plankton_cc_flip_check - scan - webgl_aquiarium - light_sensor
,
Sep 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/cf005ed89e0b64c4ccc99e71bc3c6ba2bebbe553 commit cf005ed89e0b64c4ccc99e71bc3c6ba2bebbe553 Author: Peter Shih <pihsun@chromium.org> Date: Sat Sep 30 06:25:39 2017 pytests: Cleanup to use test_ui.RunInBackground. Use test_ui.RunInBackground instead of manual invoking thread, to simplify the code. BUG= chromium:756182 TEST=make test Change-Id: I68006c7378e9a676f02799b8bf07739f471d957b Reviewed-on: https://chromium-review.googlesource.com/691400 Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org> Tested-by: Pi-Hsun Shih <pihsun@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/cf005ed89e0b64c4ccc99e71bc3c6ba2bebbe553/py/test/pytests/network_setup/network_setup.py [modify] https://crrev.com/cf005ed89e0b64c4ccc99e71bc3c6ba2bebbe553/py/test/pytests/battery_cycle.py [modify] https://crrev.com/cf005ed89e0b64c4ccc99e71bc3c6ba2bebbe553/py/test/pytests/scan/scan.py [modify] https://crrev.com/cf005ed89e0b64c4ccc99e71bc3c6ba2bebbe553/py/test/pytests/charger.py [modify] https://crrev.com/cf005ed89e0b64c4ccc99e71bc3c6ba2bebbe553/py/test/pytests/wait_external_test.py [modify] https://crrev.com/cf005ed89e0b64c4ccc99e71bc3c6ba2bebbe553/py/test/test_ui.py [modify] https://crrev.com/cf005ed89e0b64c4ccc99e71bc3c6ba2bebbe553/py/test/pytests/update_firmware.py [modify] https://crrev.com/cf005ed89e0b64c4ccc99e71bc3c6ba2bebbe553/py/test/pytests/brightness/brightness.py [modify] https://crrev.com/cf005ed89e0b64c4ccc99e71bc3c6ba2bebbe553/py/test/pytests/usb.py [modify] https://crrev.com/cf005ed89e0b64c4ccc99e71bc3c6ba2bebbe553/py/test/pytests/bad_blocks.py [modify] https://crrev.com/cf005ed89e0b64c4ccc99e71bc3c6ba2bebbe553/py/test/pytests/tpm_diagnosis.py [modify] https://crrev.com/cf005ed89e0b64c4ccc99e71bc3c6ba2bebbe553/py/test/pytests/button.py
,
Aug 1
,
Sep 7
|
|||
►
Sign in to add a comment |
|||
Comment 1 by bugdroid1@chromium.org
, Sep 29 2017