Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1982)

Unified Diff: build/android/pylib/base/test_dispatcher_unittest.py

Issue 23440009: [android] Fail if all devices drop offline while running tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/base/test_dispatcher.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/base/test_dispatcher_unittest.py
diff --git a/build/android/pylib/base/test_dispatcher_unittest.py b/build/android/pylib/base/test_dispatcher_unittest.py
index 88dfda69f01939a1253b8b7739a3207cf3dadcc2..c6078dbdfcfca6f0bb433067139f8158cd181920 100644
--- a/build/android/pylib/base/test_dispatcher_unittest.py
+++ b/build/android/pylib/base/test_dispatcher_unittest.py
@@ -186,6 +186,15 @@ class TestShard(unittest.TestCase):
self.assertEqual(len(results.GetAll()), 0)
self.assertEqual(exit_code, constants.ERROR_EXIT_CODE)
+ def testTestsRemainWithAllDevicesOffline(self):
+ attached_devices = android_commands.GetAttachedDevices
+ android_commands.GetAttachedDevices = lambda: []
+ try:
+ with self.assertRaises(AssertionError):
+ results, exit_code = TestShard._RunShard(MockRunner)
+ finally:
+ android_commands.GetAttachedDevices = attached_devices
+
class TestReplicate(unittest.TestCase):
"""Tests test_dispatcher.RunTests with replication."""
« no previous file with comments | « build/android/pylib/base/test_dispatcher.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698