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

Side by Side Diff: tools/heapcheck/chrome_tests.py

Issue 10815061: Valgrind/Heapchecker: Add content_browsertests to chrome_tests.py (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | tools/valgrind/chrome_tests.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 ''' Runs various chrome tests through heapcheck_test.py. 6 ''' Runs various chrome tests through heapcheck_test.py.
7 7
8 Most of this code is copied from ../valgrind/chrome_tests.py. 8 Most of this code is copied from ../valgrind/chrome_tests.py.
9 TODO(glider): put common functions to a standalone module. 9 TODO(glider): put common functions to a standalone module.
10 ''' 10 '''
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 ''' 75 '''
76 76
77 def __init__(self, options, args, test): 77 def __init__(self, options, args, test):
78 # The known list of tests. 78 # The known list of tests.
79 # Recognise the original abbreviations as well as full executable names. 79 # Recognise the original abbreviations as well as full executable names.
80 self._test_list = { 80 self._test_list = {
81 "ash": self.TestAsh, "ash_unittests": self.TestAsh, 81 "ash": self.TestAsh, "ash_unittests": self.TestAsh,
82 "aura": self.TestAura, "aura_unittests": self.TestAura, 82 "aura": self.TestAura, "aura_unittests": self.TestAura,
83 "base": self.TestBase, "base_unittests": self.TestBase, 83 "base": self.TestBase, "base_unittests": self.TestBase,
84 "browser": self.TestBrowser, "browser_tests": self.TestBrowser, 84 "browser": self.TestBrowser, "browser_tests": self.TestBrowser,
85 "content": self.TestContent, "content_unittests": self.TestContent,
86 "content_browsertests": self.TestContentBrowser,
87 "courgette": self.TestCourgette,
88 "courgette_unittests": self.TestCourgette,
85 "crypto": self.TestCrypto, "crypto_unittests": self.TestCrypto, 89 "crypto": self.TestCrypto, "crypto_unittests": self.TestCrypto,
86 "googleurl": self.TestGURL, "googleurl_unittests": self.TestGURL, 90 "googleurl": self.TestGURL, "googleurl_unittests": self.TestGURL,
87 "content": self.TestContent, "content_unittests": self.TestContent,
88 "courgette": self.TestCourgette,
89 "courgette_unittests": self.TestCourgette,
90 "ipc": self.TestIpc, "ipc_tests": self.TestIpc, 91 "ipc": self.TestIpc, "ipc_tests": self.TestIpc,
91 "layout": self.TestLayout, "layout_tests": self.TestLayout, 92 "layout": self.TestLayout, "layout_tests": self.TestLayout,
92 "media": self.TestMedia, "media_unittests": self.TestMedia, 93 "media": self.TestMedia, "media_unittests": self.TestMedia,
93 "net": self.TestNet, "net_unittests": self.TestNet, 94 "net": self.TestNet, "net_unittests": self.TestNet,
94 "printing": self.TestPrinting, "printing_unittests": self.TestPrinting, 95 "printing": self.TestPrinting, "printing_unittests": self.TestPrinting,
95 "remoting": self.TestRemoting, "remoting_unittests": self.TestRemoting, 96 "remoting": self.TestRemoting, "remoting_unittests": self.TestRemoting,
97 "sql": self.TestSql, "sql_unittests": self.TestSql,
96 "startup": self.TestStartup, "startup_tests": self.TestStartup, 98 "startup": self.TestStartup, "startup_tests": self.TestStartup,
97 "sync": self.TestSync, "sync_unit_tests": self.TestSync, 99 "sync": self.TestSync, "sync_unit_tests": self.TestSync,
98 "test_shell": self.TestTestShell, "test_shell_tests": self.TestTestShell, 100 "test_shell": self.TestTestShell, "test_shell_tests": self.TestTestShell,
101 "ui_unit": self.TestUIUnit, "ui_unittests": self.TestUIUnit,
99 "unit": self.TestUnit, "unit_tests": self.TestUnit, 102 "unit": self.TestUnit, "unit_tests": self.TestUnit,
100 "views": self.TestViews, "views_unittests": self.TestViews, 103 "views": self.TestViews, "views_unittests": self.TestViews,
101 "sql": self.TestSql, "sql_unittests": self.TestSql,
102 "ui_unit": self.TestUIUnit, "ui_unittests": self.TestUIUnit,
103 "gfx": self.TestGfx, "gfx_unittests": self.TestGfx, 104 "gfx": self.TestGfx, "gfx_unittests": self.TestGfx,
104 } 105 }
105 106
106 if test not in self._test_list: 107 if test not in self._test_list:
107 raise TestNotFound("Unknown test: %s" % test) 108 raise TestNotFound("Unknown test: %s" % test)
108 109
109 self._options = options 110 self._options = options
110 self._args = args 111 self._args = args
111 self._test = test 112 self._test = test
112 113
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 249
249 def TestAura(self): 250 def TestAura(self):
250 return self.SimpleTest("aura", "aura_unittests") 251 return self.SimpleTest("aura", "aura_unittests")
251 252
252 def TestBase(self): 253 def TestBase(self):
253 return self.SimpleTest("base", "base_unittests") 254 return self.SimpleTest("base", "base_unittests")
254 255
255 def TestBrowser(self): 256 def TestBrowser(self):
256 return self.SimpleTest("chrome", "browser_tests") 257 return self.SimpleTest("chrome", "browser_tests")
257 258
259 def TestContent(self):
260 return self.SimpleTest("content", "content_unittests")
261
262 def TestContentBrowser(self):
263 return self.SimpleTest("content", "content_browsertests")
264
265 def TestCourgette(self):
266 return self.SimpleTest("courgette", "courgette_unittests")
267
258 def TestCrypto(self): 268 def TestCrypto(self):
259 return self.SimpleTest("crypto", "crypto_unittests") 269 return self.SimpleTest("crypto", "crypto_unittests")
260 270
261 def TestGURL(self): 271 def TestGURL(self):
262 return self.SimpleTest("chrome", "googleurl_unittests") 272 return self.SimpleTest("chrome", "googleurl_unittests")
263 273
264 def TestContent(self): 274 def TestIpc(self):
265 return self.SimpleTest("content", "content_unittests") 275 return self.SimpleTest("ipc", "ipc_tests")
266
267 def TestCourgette(self):
268 return self.SimpleTest("courgette", "courgette_unittests")
269 276
270 def TestMedia(self): 277 def TestMedia(self):
271 return self.SimpleTest("chrome", "media_unittests") 278 return self.SimpleTest("chrome", "media_unittests")
272 279
280 def TestNet(self):
281 return self.SimpleTest("net", "net_unittests")
282
273 def TestPrinting(self): 283 def TestPrinting(self):
274 return self.SimpleTest("chrome", "printing_unittests") 284 return self.SimpleTest("chrome", "printing_unittests")
275 285
276 def TestRemoting(self): 286 def TestRemoting(self):
277 return self.SimpleTest("chrome", "remoting_unittests") 287 return self.SimpleTest("chrome", "remoting_unittests")
278 288
279 def TestSync(self): 289 def TestSync(self):
280 return self.SimpleTest("chrome", "sync_unit_tests") 290 return self.SimpleTest("chrome", "sync_unit_tests")
281 291
282 def TestIpc(self):
283 return self.SimpleTest("ipc", "ipc_tests")
284
285 def TestNet(self):
286 return self.SimpleTest("net", "net_unittests")
287
288 def TestStartup(self): 292 def TestStartup(self):
289 # We don't need the performance results, we're just looking for pointer 293 # We don't need the performance results, we're just looking for pointer
290 # errors, so set number of iterations down to the minimum. 294 # errors, so set number of iterations down to the minimum.
291 os.putenv("STARTUP_TESTS_NUMCYCLES", "1") 295 os.putenv("STARTUP_TESTS_NUMCYCLES", "1")
292 logging.info("export STARTUP_TESTS_NUMCYCLES=1"); 296 logging.info("export STARTUP_TESTS_NUMCYCLES=1");
293 return self.SimpleTest("chrome", "startup_tests") 297 return self.SimpleTest("chrome", "startup_tests")
294 298
295 def TestTestShell(self): 299 def TestTestShell(self):
296 return self.SimpleTest("webkit", "test_shell_tests") 300 return self.SimpleTest("webkit", "test_shell_tests")
297 301
302 def TestUIUnit(self):
303 return self.SimpleTest("chrome", "ui_unittests")
304
298 def TestUnit(self): 305 def TestUnit(self):
299 return self.SimpleTest("chrome", "unit_tests") 306 return self.SimpleTest("chrome", "unit_tests")
300 307
308 def TestSql(self):
309 return self.SimpleTest("chrome", "sql_unittests")
310
301 def TestViews(self): 311 def TestViews(self):
302 return self.SimpleTest("views", "views_unittests") 312 return self.SimpleTest("views", "views_unittests")
303 313
304 def TestSql(self):
305 return self.SimpleTest("chrome", "sql_unittests")
306
307 def TestUIUnit(self):
308 return self.SimpleTest("chrome", "ui_unittests")
309
310 def TestGfx(self): 314 def TestGfx(self):
311 # Run ui_unittests, a successor of gfx_unittests, since gfx_unittests is 315 # Run ui_unittests, a successor of gfx_unittests, since gfx_unittests is
312 # deprecated. 316 # deprecated.
313 # TODO(hbono): This is a band-aid fix. We need to change the master script 317 # TODO(hbono): This is a band-aid fix. We need to change the master script
314 # so our bots run ui_unittests. 318 # so our bots run ui_unittests.
315 return self.SimpleTest("chrome", "ui_unittests") 319 return self.SimpleTest("chrome", "ui_unittests")
316 320
317 def TestLayoutChunk(self, chunk_num, chunk_size): 321 def TestLayoutChunk(self, chunk_num, chunk_size):
318 '''Runs tests [chunk_num*chunk_size .. (chunk_num+1)*chunk_size). 322 '''Runs tests [chunk_num*chunk_size .. (chunk_num+1)*chunk_size).
319 323
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 for t in options.test: 463 for t in options.test:
460 tests = ChromeTests(options, args, t) 464 tests = ChromeTests(options, args, t)
461 ret = tests.Run() 465 ret = tests.Run()
462 if ret: 466 if ret:
463 return ret 467 return ret
464 return 0 468 return 0
465 469
466 470
467 if __name__ == "__main__": 471 if __name__ == "__main__":
468 sys.exit(main()) 472 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | tools/valgrind/chrome_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698