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

Side by Side Diff: bin/cros_au_test_harness.py

Issue 6135002: Add simple update test to pfq. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import optparse 7 import optparse
8 import os 8 import os
9 import re 9 import re
10 import sys 10 import sys
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 371
372 self.AttemptUpdateWithFilter(DelayedFilter()) 372 self.AttemptUpdateWithFilter(DelayedFilter())
373 373
374 def SimpleTest(self): 374 def SimpleTest(self):
375 """A simple update that updates the target image to itself. 375 """A simple update that updates the target image to itself.
376 376
377 We explicitly don't use test prefix so that isn't run by default. Can be 377 We explicitly don't use test prefix so that isn't run by default. Can be
378 run using test_prefix option. 378 run using test_prefix option.
379 """ 379 """
380 self.PrepareBase(self.target_image_path) 380 self.PrepareBase(self.target_image_path)
381 self._UpdateImage(self.target_image_path) 381 self.PerformUpdate(self.target_image_path, self.target_image_path)
382 self.VerifyImage(100) 382 self.VerifyImage(100)
383 383
384 384
385 class RealAUTest(unittest.TestCase, AUTest): 385 class RealAUTest(unittest.TestCase, AUTest):
386 """Test harness for updating real images.""" 386 """Test harness for updating real images."""
387 387
388 def setUp(self): 388 def setUp(self):
389 AUTest.setUp(self) 389 AUTest.setUp(self)
390 390
391 @classmethod 391 @classmethod
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 test_loader.testMethodPrefix = options.test_prefix 638 test_loader.testMethodPrefix = options.test_prefix
639 test_suite = test_loader.loadTestsFromTestCase(test_class) 639 test_suite = test_loader.loadTestsFromTestCase(test_class)
640 test_result = unittest.TextTestRunner(verbosity=2).run(test_suite) 640 test_result = unittest.TextTestRunner(verbosity=2).run(test_suite)
641 641
642 if not test_result.wasSuccessful(): 642 if not test_result.wasSuccessful():
643 Die('Test harness was not successful') 643 Die('Test harness was not successful')
644 644
645 645
646 if __name__ == '__main__': 646 if __name__ == '__main__':
647 main() 647 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698