scripts: run Cleanup() on deploy_chrome_unittest.tearDown()
Failing to clean up `DeployChrome` instances is apparently leading to
`TempDir.__del__` being run at arbitrary points in the future (something
something CPython's cycle GC). This method may be called when
`osutils.RmDir` is mocked out, which can interfere with other tests.
BUG=b:257968883
TEST=Ran unittests.
Change-Id: I03163126e6540a986315d0eb703e0a5b394068c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4085803
Tested-by: George Burgess <gbiv@chromium.org>
Reviewed-by: Sloan Johnson <sloanjohnson@google.com>
Commit-Queue: George Burgess <gbiv@chromium.org>
diff --git a/scripts/deploy_chrome_unittest.py b/scripts/deploy_chrome_unittest.py
index f847089..6f2ea5f 100644
--- a/scripts/deploy_chrome_unittest.py
+++ b/scripts/deploy_chrome_unittest.py
@@ -276,6 +276,9 @@
remote_access.RemoteAccess, "RemoteReboot", return_value=True
)
+ def tearDown(self):
+ self.deploy.Cleanup()
+
class TestCheckIfBoardMatches(DeployTest):
"""Testing checking whether the DUT board matches the target board."""