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

Side by Side Diff: build/android/pylib/gtest/test_runner.py

Issue 13637010: Android: Avoid multiple data file pushes for unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 glob 5 import glob
6 import logging 6 import logging
7 import os 7 import os
8 8
9 from pylib import android_commands 9 from pylib import android_commands
10 from pylib import constants 10 from pylib import constants
(...skipping 12 matching lines...) Expand all
23 23
24 Args: 24 Args:
25 test_suite_basename: The test suite basename for which to return file paths. 25 test_suite_basename: The test suite basename for which to return file paths.
26 26
27 Returns: 27 Returns:
28 A list of test file and directory paths. 28 A list of test file and directory paths.
29 """ 29 """
30 # Ideally, we'd just push all test data. However, it has >100MB, and a lot 30 # Ideally, we'd just push all test data. However, it has >100MB, and a lot
31 # of the files are not relevant (some are used for browser_tests, others for 31 # of the files are not relevant (some are used for browser_tests, others for
32 # features not supported, etc..). 32 # features not supported, etc..).
33 if test_suite_basename in ['base_unittests', 'sql_unittests', 'unit_tests']: 33 if test_suite_basename == 'base_unittests':
frankf 2013/04/08 19:19:37 sql_unittests don't have any deps?
nilesh 2013/04/08 23:50:57 No, no files are needed for sql_unittests.
34 return [
35 'base/test/data/',
36 ]
37 elif test_suite_basename == 'unit_tests':
34 test_files = [ 38 test_files = [
35 'base/test/data/', 39 'base/test/data/',
36 'chrome/test/data/download-test1.lib', 40 'chrome/test/data/download-test1.lib',
37 'chrome/test/data/extensions/bad_magic.crx', 41 'chrome/test/data/extensions/bad_magic.crx',
38 'chrome/test/data/extensions/good.crx', 42 'chrome/test/data/extensions/good.crx',
39 'chrome/test/data/extensions/icon1.png', 43 'chrome/test/data/extensions/icon1.png',
40 'chrome/test/data/extensions/icon2.png', 44 'chrome/test/data/extensions/icon2.png',
41 'chrome/test/data/extensions/icon3.png', 45 'chrome/test/data/extensions/icon3.png',
42 'chrome/test/data/extensions/allow_silent_upgrade/', 46 'chrome/test/data/extensions/allow_silent_upgrade/',
43 'chrome/test/data/extensions/app/', 47 'chrome/test/data/extensions/app/',
44 'chrome/test/data/extensions/bad/', 48 'chrome/test/data/extensions/bad/',
45 'chrome/test/data/extensions/effective_host_permissions/', 49 'chrome/test/data/extensions/effective_host_permissions/',
46 'chrome/test/data/extensions/empty_manifest/', 50 'chrome/test/data/extensions/empty_manifest/',
47 'chrome/test/data/extensions/good/Extensions/', 51 'chrome/test/data/extensions/good/Extensions/',
48 'chrome/test/data/extensions/manifest_tests/', 52 'chrome/test/data/extensions/manifest_tests/',
49 'chrome/test/data/extensions/page_action/', 53 'chrome/test/data/extensions/page_action/',
50 'chrome/test/data/extensions/permissions/', 54 'chrome/test/data/extensions/permissions/',
51 'chrome/test/data/extensions/script_and_capture/', 55 'chrome/test/data/extensions/script_and_capture/',
52 'chrome/test/data/extensions/unpacker/', 56 'chrome/test/data/extensions/unpacker/',
53 'chrome/test/data/bookmarks/', 57 'chrome/test/data/bookmarks/',
54 'chrome/test/data/components/', 58 'chrome/test/data/components/',
55 'chrome/test/data/extensions/json_schema_test.js', 59 'chrome/test/data/extensions/json_schema_test.js',
56 'chrome/test/data/History/', 60 'chrome/test/data/History/',
57 'chrome/test/data/json_schema_validator/', 61 'chrome/test/data/json_schema_validator/',
58 'chrome/test/data/pref_service/', 62 'chrome/test/data/pref_service/',
63 'chrome/test/data/simple_open_search.xml',
59 'chrome/test/data/top_sites/', 64 'chrome/test/data/top_sites/',
60 'chrome/test/data/web_app_info/', 65 'chrome/test/data/web_app_info/',
61 'chrome/test/data/web_database', 66 'chrome/test/data/web_database',
62 'chrome/test/data/webui/', 67 'chrome/test/data/webui/',
63 'chrome/test/data/zip', 68 'chrome/test/data/zip',
64 'chrome/third_party/mock4js/', 69 'chrome/third_party/mock4js/',
65 'content/browser/gpu/software_rendering_list.json', 70 'net/data/ssl/certificates',
frankf 2013/04/08 19:19:37 I'm assuming trailing slash is optional.
nilesh 2013/04/08 23:50:57 yes.
66 'net/data/cache_tests/insert_load1',
67 'net/data/cache_tests/dirty_entry5',
68 'net/data/ssl/certificates/',
69 'third_party/accessibility-developer-tools/gen/axs_testing.js', 71 'third_party/accessibility-developer-tools/gen/axs_testing.js',
70 'ui/base/test/data/data_pack_unittest',
71 ] 72 ]
72 if test_suite_basename == 'unit_tests': 73 # The following are spell check data. Now only list the data under
73 test_files += ['chrome/test/data/simple_open_search.xml'] 74 # third_party/hunspell_dictionaries which are used by unit tests.
74 # The following are spell check data. Now only list the data under 75 old_cwd = os.getcwd()
75 # third_party/hunspell_dictionaries which are used by unit tests. 76 os.chdir(constants.CHROME_DIR)
76 old_cwd = os.getcwd() 77 test_files += glob.glob('third_party/hunspell_dictionaries/*.bdic')
77 os.chdir(constants.CHROME_DIR) 78 os.chdir(old_cwd)
78 test_files += glob.glob('third_party/hunspell_dictionaries/*.bdic')
79 os.chdir(old_cwd)
80 return test_files 79 return test_files
81 elif test_suite_basename == 'media_unittests': 80 elif test_suite_basename == 'media_unittests':
82 return [ 81 return [
83 'media/test/data', 82 'media/test/data',
84 ] 83 ]
85 elif test_suite_basename == 'net_unittests': 84 elif test_suite_basename == 'net_unittests':
86 return [ 85 return [
87 'chrome/test/data/animate1.gif', 86 'chrome/test/data/animate1.gif',
88 'chrome/test/data/simple.html', 87 'chrome/test/data/simple.html',
89 'net/data/cache_tests', 88 'net/data/cache_tests',
90 'net/data/filter_unittests', 89 'net/data/filter_unittests',
91 'net/data/ftp', 90 'net/data/ftp',
92 'net/data/proxy_resolver_v8_tracing_unittest', 91 'net/data/proxy_resolver_v8_tracing_unittest',
93 'net/data/proxy_resolver_v8_unittest', 92 'net/data/proxy_resolver_v8_unittest',
93 'net/data/proxy_script_fetcher_unittest',
94 'net/data/ssl/certificates', 94 'net/data/ssl/certificates',
95 'net/data/url_request_unittest/', 95 'net/data/url_request_unittest/',
96 'net/data/proxy_script_fetcher_unittest'
97 ] 96 ]
98 elif test_suite_basename == 'ui_tests': 97 elif test_suite_basename == 'ui_tests':
99 return [ 98 return [
100 'chrome/test/data/dromaeo', 99 'chrome/test/data/dromaeo',
101 'chrome/test/data/json2.js', 100 'chrome/test/data/json2.js',
102 'chrome/test/data/sunspider', 101 'chrome/test/data/sunspider',
103 ] 102 ]
103 elif test_suite_basename == 'ui_unittests':
104 return [
105 'ui/base/test/data/data_pack_unittest/truncated-header.pak',
106 ]
104 elif test_suite_basename == 'content_unittests': 107 elif test_suite_basename == 'content_unittests':
105 return [ 108 return [
109 'content/browser/gpu/software_rendering_list.json',
106 'content/test/data/gpu/webgl_conformance_test_expectations.txt', 110 'content/test/data/gpu/webgl_conformance_test_expectations.txt',
107 'net/data/ssl/certificates/', 111 'net/data/ssl/certificates/',
112 'third_party/hyphen/hyph_en_US.dic',
108 'webkit/data/dom_storage/webcore_test_database.localstorage', 113 'webkit/data/dom_storage/webcore_test_database.localstorage',
109 'third_party/hyphen/hyph_en_US.dic',
110 ] 114 ]
111 elif test_suite_basename == 'cc_perftests': 115 elif test_suite_basename == 'cc_perftests':
112 return [ 116 return [
113 'cc/test/data', 117 'cc/test/data',
114 ] 118 ]
115 elif test_suite_basename == 'perf_tests': 119 elif test_suite_basename == 'perf_tests':
116 return [ 120 return [
117 'base/test/data', 121 'base/test/data',
118 ] 122 ]
119 elif test_suite_basename == 'content_browsertests': 123 elif test_suite_basename == 'content_browsertests':
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 self.LaunchChromeTestServerSpawner() 377 self.LaunchChromeTestServerSpawner()
374 self.tool.SetupEnvironment() 378 self.tool.SetupEnvironment()
375 379
376 #override 380 #override
377 def TearDown(self): 381 def TearDown(self):
378 """Cleans up the test enviroment for the test suite.""" 382 """Cleans up the test enviroment for the test suite."""
379 self.tool.CleanUpEnvironment() 383 self.tool.CleanUpEnvironment()
380 if self._cleanup_test_files: 384 if self._cleanup_test_files:
381 self.adb.RemovePushedFiles() 385 self.adb.RemovePushedFiles()
382 super(TestRunner, self).TearDown() 386 super(TestRunner, self).TearDown()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698