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

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

Issue 1526183002: Revert of [Android] Add ChromiumNetTestSupport.apk for the java EmbeddedTestServer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 15 matching lines...) Expand all
26 # Ref: http://developer.android.com/reference/android/app/Activity.html 26 # Ref: http://developer.android.com/reference/android/app/Activity.html
27 _ACTIVITY_RESULT_CANCELED = 0 27 _ACTIVITY_RESULT_CANCELED = 0
28 _ACTIVITY_RESULT_OK = -1 28 _ACTIVITY_RESULT_OK = -1
29 29
30 _COMMAND_LINE_PARAMETER = 'cmdlinearg-parameter' 30 _COMMAND_LINE_PARAMETER = 'cmdlinearg-parameter'
31 _DEFAULT_ANNOTATIONS = [ 31 _DEFAULT_ANNOTATIONS = [
32 'Smoke', 'SmallTest', 'MediumTest', 'LargeTest', 32 'Smoke', 'SmallTest', 'MediumTest', 'LargeTest',
33 'EnormousTest', 'IntegrationTest'] 33 'EnormousTest', 'IntegrationTest']
34 _EXCLUDE_UNLESS_REQUESTED_ANNOTATIONS = [ 34 _EXCLUDE_UNLESS_REQUESTED_ANNOTATIONS = [
35 'DisabledTest', 'FlakyTest'] 35 'DisabledTest', 'FlakyTest']
36 _EXTRA_ENABLE_HTTP_SERVER = (
37 'org.chromium.chrome.test.ChromeInstrumentationTestRunner.'
38 + 'EnableTestHttpServer')
36 _EXTRA_DRIVER_TEST_LIST = ( 39 _EXTRA_DRIVER_TEST_LIST = (
37 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TestList') 40 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TestList')
38 _EXTRA_DRIVER_TEST_LIST_FILE = ( 41 _EXTRA_DRIVER_TEST_LIST_FILE = (
39 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TestListFile') 42 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TestListFile')
40 _EXTRA_DRIVER_TARGET_PACKAGE = ( 43 _EXTRA_DRIVER_TARGET_PACKAGE = (
41 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TargetPackage') 44 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TargetPackage')
42 _EXTRA_DRIVER_TARGET_CLASS = ( 45 _EXTRA_DRIVER_TARGET_CLASS = (
43 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TargetClass') 46 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TargetClass')
44 _EXTRA_TIMEOUT_SCALE = ( 47 _EXTRA_TIMEOUT_SCALE = (
45 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TimeoutScale') 48 'org.chromium.test.driver.OnDeviceInstrumentationDriver.TimeoutScale')
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 for t in tests: 591 for t in tests:
589 parameters = ParseCommandLineFlagParameters(t['annotations']) 592 parameters = ParseCommandLineFlagParameters(t['annotations'])
590 if parameters: 593 if parameters:
591 t['flags'] = parameters[0] 594 t['flags'] = parameters[0]
592 for p in parameters[1:]: 595 for p in parameters[1:]:
593 parameterized_t = copy.copy(t) 596 parameterized_t = copy.copy(t)
594 parameterized_t['flags'] = p 597 parameterized_t['flags'] = p
595 new_tests.append(parameterized_t) 598 new_tests.append(parameterized_t)
596 return tests + new_tests 599 return tests + new_tests
597 600
601 @staticmethod
602 def GetHttpServerEnvironmentVars():
603 return {
604 _EXTRA_ENABLE_HTTP_SERVER: None,
605 }
606
598 def GetDriverEnvironmentVars( 607 def GetDriverEnvironmentVars(
599 self, test_list=None, test_list_file_path=None): 608 self, test_list=None, test_list_file_path=None):
600 env = { 609 env = {
601 _EXTRA_DRIVER_TARGET_PACKAGE: self.test_package, 610 _EXTRA_DRIVER_TARGET_PACKAGE: self.test_package,
602 _EXTRA_DRIVER_TARGET_CLASS: self.test_runner, 611 _EXTRA_DRIVER_TARGET_CLASS: self.test_runner,
603 _EXTRA_TIMEOUT_SCALE: self._timeout_scale, 612 _EXTRA_TIMEOUT_SCALE: self._timeout_scale,
604 } 613 }
605 614
606 if test_list: 615 if test_list:
607 env[_EXTRA_DRIVER_TEST_LIST] = ','.join(test_list) 616 env[_EXTRA_DRIVER_TEST_LIST] = ','.join(test_list)
(...skipping 12 matching lines...) Expand all
620 def GenerateTestResults( 629 def GenerateTestResults(
621 result_code, result_bundle, statuses, start_ms, duration_ms): 630 result_code, result_bundle, statuses, start_ms, duration_ms):
622 return GenerateTestResults(result_code, result_bundle, statuses, 631 return GenerateTestResults(result_code, result_bundle, statuses,
623 start_ms, duration_ms) 632 start_ms, duration_ms)
624 633
625 #override 634 #override
626 def TearDown(self): 635 def TearDown(self):
627 if self._isolate_delegate: 636 if self._isolate_delegate:
628 self._isolate_delegate.Clear() 637 self._isolate_delegate.Clear()
629 638
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698