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

Side by Side Diff: build/android/pylib/instrumentation/instrumentation_test_instance.py

Issue 2201833002: Added tombstones in instrumentation tests results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import collections 5 import collections
6 import copy 6 import copy
7 import logging 7 import logging
8 import os 8 import os
9 import pickle 9 import pickle
10 import re 10 import re
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 self._driver_package = None 386 self._driver_package = None
387 self._driver_name = None 387 self._driver_name = None
388 self._initializeDriverAttributes() 388 self._initializeDriverAttributes()
389 389
390 self._timeout_scale = None 390 self._timeout_scale = None
391 self._initializeTestControlAttributes(args) 391 self._initializeTestControlAttributes(args)
392 392
393 self._coverage_directory = None 393 self._coverage_directory = None
394 self._initializeTestCoverageAttributes(args) 394 self._initializeTestCoverageAttributes(args)
395 395
396 self._tombstones = False
jbudorick 2016/08/01 17:39:18 Both the argument and the variable should have a s
BigBossZhiling 2016/08/01 22:35:12 Done.
397 self._initializeTombStonesAttributes(args)
398
396 def _initializeApkAttributes(self, args, error_func): 399 def _initializeApkAttributes(self, args, error_func):
397 if args.apk_under_test: 400 if args.apk_under_test:
398 apk_under_test_path = args.apk_under_test 401 apk_under_test_path = args.apk_under_test
399 if not args.apk_under_test.endswith('.apk'): 402 if not args.apk_under_test.endswith('.apk'):
400 apk_under_test_path = os.path.join( 403 apk_under_test_path = os.path.join(
401 constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR, 404 constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR,
402 '%s.apk' % args.apk_under_test) 405 '%s.apk' % args.apk_under_test)
403 406
404 if not os.path.exists(apk_under_test_path): 407 if not os.path.exists(apk_under_test_path):
405 error_func('Unable to find APK under test: %s' % apk_under_test_path) 408 error_func('Unable to find APK under test: %s' % apk_under_test_path)
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 else: 531 else:
529 self._driver_apk = None 532 self._driver_apk = None
530 533
531 def _initializeTestControlAttributes(self, args): 534 def _initializeTestControlAttributes(self, args):
532 self._screenshot_dir = args.screenshot_dir 535 self._screenshot_dir = args.screenshot_dir
533 self._timeout_scale = args.timeout_scale or 1 536 self._timeout_scale = args.timeout_scale or 1
534 537
535 def _initializeTestCoverageAttributes(self, args): 538 def _initializeTestCoverageAttributes(self, args):
536 self._coverage_directory = args.coverage_dir 539 self._coverage_directory = args.coverage_dir
537 540
541 def _initializeTombStonesAttributes(self, args):
jbudorick 2016/08/01 17:39:18 nit: Tombstones, not TombStones
BigBossZhiling 2016/08/01 22:35:12 Done.
542 self._tombstones = args.tombstones
543
538 @property 544 @property
539 def additional_apks(self): 545 def additional_apks(self):
540 return self._additional_apks 546 return self._additional_apks
541 547
542 @property 548 @property
543 def apk_under_test(self): 549 def apk_under_test(self):
544 return self._apk_under_test 550 return self._apk_under_test
545 551
546 @property 552 @property
547 def apk_under_test_incremental_install_script(self): 553 def apk_under_test_incremental_install_script(self):
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 return self._test_package 606 return self._test_package
601 607
602 @property 608 @property
603 def test_runner(self): 609 def test_runner(self):
604 return self._test_runner 610 return self._test_runner
605 611
606 @property 612 @property
607 def timeout_scale(self): 613 def timeout_scale(self):
608 return self._timeout_scale 614 return self._timeout_scale
609 615
616 @property
617 def tombstones(self):
618 return self._tombstones
619
610 #override 620 #override
611 def TestType(self): 621 def TestType(self):
612 return 'instrumentation' 622 return 'instrumentation'
613 623
614 #override 624 #override
615 def SetUp(self): 625 def SetUp(self):
616 if self._isolate_delegate: 626 if self._isolate_delegate:
617 self._isolate_delegate.Remap( 627 self._isolate_delegate.Remap(
618 self._isolate_abs_path, self._isolated_abs_path) 628 self._isolate_abs_path, self._isolated_abs_path)
619 self._isolate_delegate.MoveOutputDeps() 629 self._isolate_delegate.MoveOutputDeps()
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 @staticmethod 688 @staticmethod
679 def GenerateTestResults( 689 def GenerateTestResults(
680 result_code, result_bundle, statuses, start_ms, duration_ms): 690 result_code, result_bundle, statuses, start_ms, duration_ms):
681 return GenerateTestResults(result_code, result_bundle, statuses, 691 return GenerateTestResults(result_code, result_bundle, statuses,
682 start_ms, duration_ms) 692 start_ms, duration_ms)
683 693
684 #override 694 #override
685 def TearDown(self): 695 def TearDown(self):
686 if self._isolate_delegate: 696 if self._isolate_delegate:
687 self._isolate_delegate.Clear() 697 self._isolate_delegate.Clear()
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/instrumentation/test_result.py » ('j') | build/android/pylib/instrumentation/test_result.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698