OLD | NEW |
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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR, | 379 constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR, |
380 'OnDeviceInstrumentationDriver.apk') | 380 'OnDeviceInstrumentationDriver.apk') |
381 if os.path.exists(self._driver_apk): | 381 if os.path.exists(self._driver_apk): |
382 driver_apk = apk_helper.ApkHelper(self._driver_apk) | 382 driver_apk = apk_helper.ApkHelper(self._driver_apk) |
383 self._driver_package = driver_apk.GetPackageName() | 383 self._driver_package = driver_apk.GetPackageName() |
384 self._driver_name = driver_apk.GetInstrumentationName() | 384 self._driver_name = driver_apk.GetInstrumentationName() |
385 else: | 385 else: |
386 self._driver_apk = None | 386 self._driver_apk = None |
387 | 387 |
388 def _initializeTestControlAttributes(self, args): | 388 def _initializeTestControlAttributes(self, args): |
| 389 self._screenshot_dir = args.screenshot_dir |
389 self._timeout_scale = args.timeout_scale or 1 | 390 self._timeout_scale = args.timeout_scale or 1 |
390 | 391 |
391 @property | 392 @property |
392 def additional_apks(self): | 393 def additional_apks(self): |
393 return self._additional_apks | 394 return self._additional_apks |
394 | 395 |
395 @property | 396 @property |
396 def apk_under_test(self): | 397 def apk_under_test(self): |
397 return self._apk_under_test | 398 return self._apk_under_test |
398 | 399 |
(...skipping 15 matching lines...) Expand all Loading... |
414 | 415 |
415 @property | 416 @property |
416 def driver_name(self): | 417 def driver_name(self): |
417 return self._driver_name | 418 return self._driver_name |
418 | 419 |
419 @property | 420 @property |
420 def package_info(self): | 421 def package_info(self): |
421 return self._package_info | 422 return self._package_info |
422 | 423 |
423 @property | 424 @property |
| 425 def screenshot_dir(self): |
| 426 return self._screenshot_dir |
| 427 |
| 428 @property |
424 def suite(self): | 429 def suite(self): |
425 return self._suite | 430 return self._suite |
426 | 431 |
427 @property | 432 @property |
428 def test_apk(self): | 433 def test_apk(self): |
429 return self._test_apk | 434 return self._test_apk |
430 | 435 |
431 @property | 436 @property |
432 def test_apk_incremental_install_script(self): | 437 def test_apk_incremental_install_script(self): |
433 return self._test_apk_incremental_install_script | 438 return self._test_apk_incremental_install_script |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 def GenerateTestResults( | 661 def GenerateTestResults( |
657 result_code, result_bundle, statuses, start_ms, duration_ms): | 662 result_code, result_bundle, statuses, start_ms, duration_ms): |
658 return GenerateTestResults(result_code, result_bundle, statuses, | 663 return GenerateTestResults(result_code, result_bundle, statuses, |
659 start_ms, duration_ms) | 664 start_ms, duration_ms) |
660 | 665 |
661 #override | 666 #override |
662 def TearDown(self): | 667 def TearDown(self): |
663 if self._isolate_delegate: | 668 if self._isolate_delegate: |
664 self._isolate_delegate.Clear() | 669 self._isolate_delegate.Clear() |
665 | 670 |
OLD | NEW |