OLD | NEW |
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 valgrind_test.py.''' | 6 ''' Runs various chrome tests through valgrind_test.py.''' |
7 | 7 |
8 import glob | 8 import glob |
9 import logging | 9 import logging |
10 import multiprocessing | 10 import multiprocessing |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 247 |
248 self.SetupLdPath(True) | 248 self.SetupLdPath(True) |
249 return tool.Run(cmd, module) | 249 return tool.Run(cmd, module) |
250 | 250 |
251 def RunCmdLine(self): | 251 def RunCmdLine(self): |
252 tool = valgrind_test.CreateTool(self._options.valgrind_tool) | 252 tool = valgrind_test.CreateTool(self._options.valgrind_tool) |
253 cmd = self._DefaultCommand(tool, None, self._args) | 253 cmd = self._DefaultCommand(tool, None, self._args) |
254 self.SetupLdPath(False) | 254 self.SetupLdPath(False) |
255 return tool.Run(cmd, None) | 255 return tool.Run(cmd, None) |
256 | 256 |
| 257 def TestAccessibility(self): |
| 258 return self.SimpleTest("accessibility", "accessibility_unittests") |
| 259 |
| 260 def TestAddressInput(self): |
| 261 return self.SimpleTest("addressinput", "libaddressinput_unittests") |
| 262 |
| 263 def TestAngle(self): |
| 264 return self.SimpleTest("angle", "angle_unittests") |
| 265 |
257 def TestAppList(self): | 266 def TestAppList(self): |
258 return self.SimpleTest("app_list", "app_list_unittests") | 267 return self.SimpleTest("app_list", "app_list_unittests") |
259 | 268 |
260 def TestAsh(self): | 269 def TestAsh(self): |
261 return self.SimpleTest("ash", "ash_unittests") | 270 return self.SimpleTest("ash", "ash_unittests") |
262 | 271 |
| 272 def TestAshShell(self): |
| 273 return self.SimpleTest("ash_shelf", "ash_shell_unittests") |
| 274 |
263 def TestAura(self): | 275 def TestAura(self): |
264 return self.SimpleTest("aura", "aura_unittests") | 276 return self.SimpleTest("aura", "aura_unittests") |
265 | 277 |
266 def TestBase(self): | 278 def TestBase(self): |
267 return self.SimpleTest("base", "base_unittests") | 279 return self.SimpleTest("base", "base_unittests") |
268 | 280 |
| 281 def TestBlinkHeap(self): |
| 282 return self.SimpleTest("blink_heap", "blink_heap_unittests") |
| 283 |
| 284 def TestBlinkPlatform(self): |
| 285 return self.SimpleTest("blink_platform", "blink_platform_unittests") |
| 286 |
| 287 def TestCacheInvalidation(self): |
| 288 return self.SimpleTest("cacheinvalidation", "cacheinvalidation_unittests") |
| 289 |
269 def TestCast(self): | 290 def TestCast(self): |
270 return self.SimpleTest("chrome", "cast_unittests") | 291 return self.SimpleTest("chrome", "cast_unittests") |
271 | 292 |
| 293 def TestCC(self): |
| 294 return self.SimpleTest("cc", "cc_unittests") |
| 295 |
| 296 def TestChromeApp(self): |
| 297 return self.SimpleTest("chrome_app", "chrome_app_unittests") |
| 298 |
| 299 def TestChromeElf(self): |
| 300 return self.SimpleTest("chrome_elf", "chrome_elf_unittests") |
| 301 |
| 302 def TestChromeDriver(self): |
| 303 return self.SimpleTest("chromedriver", "chromedriver_unittests") |
| 304 |
272 def TestChromeOS(self): | 305 def TestChromeOS(self): |
273 return self.SimpleTest("chromeos", "chromeos_unittests") | 306 return self.SimpleTest("chromeos", "chromeos_unittests") |
274 | 307 |
| 308 def TestCloudPrint(self): |
| 309 return self.SimpleTest("cloud_print", "cloud_print_unittests") |
| 310 |
275 def TestComponents(self): | 311 def TestComponents(self): |
276 return self.SimpleTest("components", "components_unittests") | 312 return self.SimpleTest("components", "components_unittests") |
277 | 313 |
278 def TestCompositor(self): | 314 def TestCompositor(self): |
279 return self.SimpleTest("compositor", "compositor_unittests") | 315 return self.SimpleTest("compositor", "compositor_unittests") |
280 | 316 |
281 def TestContent(self): | 317 def TestContent(self): |
282 return self.SimpleTest("content", "content_unittests") | 318 return self.SimpleTest("content", "content_unittests") |
283 | 319 |
284 def TestCourgette(self): | 320 def TestCourgette(self): |
285 return self.SimpleTest("courgette", "courgette_unittests") | 321 return self.SimpleTest("courgette", "courgette_unittests") |
286 | 322 |
287 def TestCrypto(self): | 323 def TestCrypto(self): |
288 return self.SimpleTest("crypto", "crypto_unittests") | 324 return self.SimpleTest("crypto", "crypto_unittests") |
289 | 325 |
290 def TestDevice(self): | 326 def TestDevice(self): |
291 return self.SimpleTest("device", "device_unittests") | 327 return self.SimpleTest("device", "device_unittests") |
292 | 328 |
| 329 def TestDisplay(self): |
| 330 return self.SimpleTest("display", "display_unittests") |
| 331 |
293 def TestEvents(self): | 332 def TestEvents(self): |
294 return self.SimpleTest("events", "events_unittests") | 333 return self.SimpleTest("events", "events_unittests") |
295 | 334 |
| 335 def TestExtensions(self): |
| 336 return self.SimpleTest("extensions", "extensions_unittests") |
| 337 |
296 def TestFFmpeg(self): | 338 def TestFFmpeg(self): |
297 return self.SimpleTest("chrome", "ffmpeg_unittests") | 339 return self.SimpleTest("chrome", "ffmpeg_unittests") |
298 | 340 |
299 def TestFFmpegRegressions(self): | 341 def TestFFmpegRegressions(self): |
300 return self.SimpleTest("chrome", "ffmpeg_regression_tests") | 342 return self.SimpleTest("chrome", "ffmpeg_regression_tests") |
301 | 343 |
302 def TestGCM(self): | 344 def TestGCM(self): |
303 return self.SimpleTest("gcm", "gcm_unit_tests") | 345 return self.SimpleTest("gcm", "gcm_unit_tests") |
304 | 346 |
| 347 def TestGfx(self): |
| 348 return self.SimpleTest("gfx", "gfx_unittests") |
| 349 |
| 350 def TestGin(self): |
| 351 return self.SimpleTest("gin", "gin_unittests") |
| 352 |
| 353 def TestGoogleApis(self): |
| 354 return self.SimpleTest("google_apis", "google_apis_unittests") |
| 355 |
305 def TestGPU(self): | 356 def TestGPU(self): |
306 return self.SimpleTest("gpu", "gpu_unittests") | 357 return self.SimpleTest("gpu", "gpu_unittests") |
307 | 358 |
308 def TestIpc(self): | 359 def TestIpc(self): |
309 return self.SimpleTest("ipc", "ipc_tests", | 360 return self.SimpleTest("ipc", "ipc_tests", |
310 valgrind_test_args=["--trace_children"]) | 361 valgrind_test_args=["--trace_children"]) |
311 | 362 |
| 363 def TestInstallerUtil(self): |
| 364 return self.SimpleTest("installer_util", "installer_util_unittests") |
| 365 |
312 def TestJingle(self): | 366 def TestJingle(self): |
313 return self.SimpleTest("chrome", "jingle_unittests") | 367 return self.SimpleTest("chrome", "jingle_unittests") |
314 | 368 |
| 369 def TestKeyboard(self): |
| 370 return self.SimpleTest("keyboard", "keyboard_unittests") |
| 371 |
315 def TestMedia(self): | 372 def TestMedia(self): |
316 return self.SimpleTest("chrome", "media_unittests") | 373 return self.SimpleTest("chrome", "media_unittests") |
317 | 374 |
318 def TestMessageCenter(self): | 375 def TestMessageCenter(self): |
319 return self.SimpleTest("message_center", "message_center_unittests") | 376 return self.SimpleTest("message_center", "message_center_unittests") |
320 | 377 |
| 378 def TestMojoAppsJS(self): |
| 379 return self.SimpleTest("mojo_apps_js", "mojo_apps_js_unittests") |
| 380 |
| 381 def TestMojoCommon(self): |
| 382 return self.SimpleTest("mojo_common", "mojo_common_unittests") |
| 383 |
| 384 def TestMojoJS(self): |
| 385 return self.SimpleTest("mojo_js", "mojo_js_unittests") |
| 386 |
| 387 def TestMojoPublicBindings(self): |
| 388 return self.SimpleTest("mojo_public_bindings", |
| 389 "mojo_public_bindings_unittests") |
| 390 |
| 391 def TestMojoPublicEnv(self): |
| 392 return self.SimpleTest("mojo_public_env", |
| 393 "mojo_public_environment_unittests") |
| 394 |
| 395 def TestMojoPublicSystem(self): |
| 396 return self.SimpleTest("mojo_public_system", |
| 397 "mojo_public_system_unittests") |
| 398 |
| 399 def TestMojoPublicSysPerf(self): |
| 400 return self.SimpleTest("mojo_public_sysperf", |
| 401 "mojo_public_system_perftests") |
| 402 |
| 403 def TestMojoPublicUtility(self): |
| 404 return self.SimpleTest("mojo_public_utility", |
| 405 "mojo_public_utility_unittests") |
| 406 |
| 407 def TestMojoServiceManager(self): |
| 408 return self.SimpleTest("mojo_service_manager", |
| 409 "mojo_service_manager_unittests") |
| 410 |
| 411 def TestMojoSystem(self): |
| 412 return self.SimpleTest("mojo_system", "mojo_system_unittests") |
| 413 |
| 414 def TestMojoViewManager(self): |
| 415 return self.SimpleTest("mojo_view_manager", "mojo_view_manager_unittests") |
| 416 |
| 417 def TestMojoViewManagerLib(self): |
| 418 return self.SimpleTest("mojo_view_manager_lib", |
| 419 "mojo_view_manager_lib_unittests") |
| 420 |
321 def TestNet(self): | 421 def TestNet(self): |
322 return self.SimpleTest("net", "net_unittests") | 422 return self.SimpleTest("net", "net_unittests") |
323 | 423 |
324 def TestNetPerf(self): | 424 def TestNetPerf(self): |
325 return self.SimpleTest("net", "net_perftests") | 425 return self.SimpleTest("net", "net_perftests") |
326 | 426 |
| 427 def TestPhoneNumber(self): |
| 428 return self.SimpleTest("phonenumber", "libphonenumber_unittests") |
| 429 |
327 def TestPPAPI(self): | 430 def TestPPAPI(self): |
328 return self.SimpleTest("chrome", "ppapi_unittests") | 431 return self.SimpleTest("chrome", "ppapi_unittests") |
329 | 432 |
330 def TestPrinting(self): | 433 def TestPrinting(self): |
331 return self.SimpleTest("chrome", "printing_unittests") | 434 return self.SimpleTest("chrome", "printing_unittests") |
332 | 435 |
333 def TestRemoting(self): | 436 def TestRemoting(self): |
334 return self.SimpleTest("chrome", "remoting_unittests", | 437 return self.SimpleTest("chrome", "remoting_unittests", |
335 cmd_args=[ | 438 cmd_args=[ |
336 "--ui-test-action-timeout=60000", | 439 "--ui-test-action-timeout=60000", |
(...skipping 19 matching lines...) Expand all Loading... |
356 | 459 |
357 def TestUIUnit(self): | 460 def TestUIUnit(self): |
358 return self.SimpleTest("chrome", "ui_unittests") | 461 return self.SimpleTest("chrome", "ui_unittests") |
359 | 462 |
360 def TestURL(self): | 463 def TestURL(self): |
361 return self.SimpleTest("chrome", "url_unittests") | 464 return self.SimpleTest("chrome", "url_unittests") |
362 | 465 |
363 def TestViews(self): | 466 def TestViews(self): |
364 return self.SimpleTest("views", "views_unittests") | 467 return self.SimpleTest("views", "views_unittests") |
365 | 468 |
366 def TestCloudPrint(self): | |
367 return self.SimpleTest("cloud_print", "cloud_print_unittests") | |
368 | |
369 def TestCacheInvalidation(self): | |
370 return self.SimpleTest("cacheinvalidation", "cacheinvalidation_unittests") | |
371 | |
372 def TestAddressInput(self): | |
373 return self.SimpleTest("addressinput", "libaddressinput_unittests") | |
374 | |
375 def TestPhoneNumber(self): | |
376 return self.SimpleTest("phonenumber", "libphonenumber_unittests") | |
377 | |
378 def TestMojoSystem(self): | |
379 return self.SimpleTest("mojo_system", "mojo_system_unittests") | |
380 | |
381 def TestMojoPublicSystem(self): | |
382 return self.SimpleTest("mojo_public_system", | |
383 "mojo_public_system_unittests") | |
384 | |
385 def TestMojoPublicUtility(self): | |
386 return self.SimpleTest("mojo_public_utility", | |
387 "mojo_public_utility_unittests") | |
388 | |
389 def TestMojoPublicBindings(self): | |
390 return self.SimpleTest("mojo_public_bindings", | |
391 "mojo_public_bindings_unittests") | |
392 | |
393 def TestMojoPublicEnv(self): | |
394 return self.SimpleTest("mojo_public_env", | |
395 "mojo_public_environment_unittests") | |
396 | |
397 def TestMojoPublicSysPerf(self): | |
398 return self.SimpleTest("mojo_public_sysperf", | |
399 "mojo_public_system_perftests") | |
400 | |
401 def TestMojoCommon(self): | |
402 return self.SimpleTest("mojo_common", "mojo_common_unittests") | |
403 | |
404 def TestMojoAppsJS(self): | |
405 return self.SimpleTest("mojo_apps_js", "mojo_apps_js_unittests") | |
406 | |
407 def TestMojoJS(self): | |
408 return self.SimpleTest("mojo_js", "mojo_js_unittests") | |
409 | |
410 def TestMojoServiceManager(self): | |
411 return self.SimpleTest("mojo_service_manager", | |
412 "mojo_service_manager_unittests") | |
413 | |
414 def TestMojoViewManager(self): | |
415 return self.SimpleTest("mojo_view_manager", "mojo_view_manager_unittests") | |
416 | |
417 def TestMojoViewManagerLib(self): | |
418 return self.SimpleTest("mojo_view_manager_lib", | |
419 "mojo_view_manager_lib_unittests") | |
420 | |
421 def TestDisplay(self): | |
422 return self.SimpleTest("display", "display_unittests") | |
423 | 469 |
424 # Valgrind timeouts are in seconds. | 470 # Valgrind timeouts are in seconds. |
425 UI_VALGRIND_ARGS = ["--timeout=14400", "--trace_children", "--indirect"] | 471 UI_VALGRIND_ARGS = ["--timeout=14400", "--trace_children", "--indirect"] |
426 # UI test timeouts are in milliseconds. | 472 # UI test timeouts are in milliseconds. |
427 UI_TEST_ARGS = ["--ui-test-action-timeout=60000", | 473 UI_TEST_ARGS = ["--ui-test-action-timeout=60000", |
428 "--ui-test-action-max-timeout=150000", | 474 "--ui-test-action-max-timeout=150000", |
429 "--no-sandbox"] | 475 "--no-sandbox"] |
430 | 476 |
431 # TODO(thestig) fine-tune these values. | 477 # TODO(thestig) fine-tune these values. |
432 # Valgrind timeouts are in seconds. | 478 # Valgrind timeouts are in seconds. |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 # mark the ones that have errors in them. These won't be visible in the | 628 # mark the ones that have errors in them. These won't be visible in the |
583 # summary list for long, but will be useful for someone reviewing this bot. | 629 # summary list for long, but will be useful for someone reviewing this bot. |
584 return self.TestLayoutChunk(chunk_num, chunk_size) | 630 return self.TestLayoutChunk(chunk_num, chunk_size) |
585 | 631 |
586 # The known list of tests. | 632 # The known list of tests. |
587 # Recognise the original abbreviations as well as full executable names. | 633 # Recognise the original abbreviations as well as full executable names. |
588 _test_list = { | 634 _test_list = { |
589 "cmdline" : RunCmdLine, | 635 "cmdline" : RunCmdLine, |
590 "addressinput": TestAddressInput, | 636 "addressinput": TestAddressInput, |
591 "libaddressinput_unittests": TestAddressInput, | 637 "libaddressinput_unittests": TestAddressInput, |
| 638 "accessibility": TestAccessibility, |
| 639 "angle": TestAngle, "angle_unittests": TestAngle, |
592 "app_list": TestAppList, "app_list_unittests": TestAppList, | 640 "app_list": TestAppList, "app_list_unittests": TestAppList, |
593 "ash": TestAsh, "ash_unittests": TestAsh, | 641 "ash": TestAsh, "ash_unittests": TestAsh, |
| 642 "ash_shell": TestAshShell, "ash_shell_unittests": TestAshShell, |
594 "aura": TestAura, "aura_unittests": TestAura, | 643 "aura": TestAura, "aura_unittests": TestAura, |
595 "base": TestBase, "base_unittests": TestBase, | 644 "base": TestBase, "base_unittests": TestBase, |
| 645 "blink_heap": TestBlinkHeap, |
| 646 "blink_platform": TestBlinkPlatform, |
596 "browser": TestBrowser, "browser_tests": TestBrowser, | 647 "browser": TestBrowser, "browser_tests": TestBrowser, |
597 "cacheinvalidation": TestCacheInvalidation, | 648 "cacheinvalidation": TestCacheInvalidation, |
598 "cacheinvalidation_unittests": TestCacheInvalidation, | 649 "cacheinvalidation_unittests": TestCacheInvalidation, |
599 "cast": TestCast, "cast_unittests": TestCast, | 650 "cast": TestCast, "cast_unittests": TestCast, |
| 651 "cc": TestCC, "cc_unittests": TestCC, |
| 652 "chrome_app": TestChromeApp, |
| 653 "chrome_elf": TestChromeElf, |
| 654 "chromedriver": TestChromeDriver, |
600 "chromeos": TestChromeOS, "chromeos_unittests": TestChromeOS, | 655 "chromeos": TestChromeOS, "chromeos_unittests": TestChromeOS, |
601 "cloud_print": TestCloudPrint, | 656 "cloud_print": TestCloudPrint, |
602 "cloud_print_unittests": TestCloudPrint, | 657 "cloud_print_unittests": TestCloudPrint, |
603 "components": TestComponents,"components_unittests": TestComponents, | 658 "components": TestComponents,"components_unittests": TestComponents, |
604 "compositor": TestCompositor,"compositor_unittests": TestCompositor, | 659 "compositor": TestCompositor,"compositor_unittests": TestCompositor, |
605 "content": TestContent, "content_unittests": TestContent, | 660 "content": TestContent, "content_unittests": TestContent, |
606 "content_browsertests": TestContentBrowser, | 661 "content_browsertests": TestContentBrowser, |
607 "courgette": TestCourgette, "courgette_unittests": TestCourgette, | 662 "courgette": TestCourgette, "courgette_unittests": TestCourgette, |
608 "crypto": TestCrypto, "crypto_unittests": TestCrypto, | 663 "crypto": TestCrypto, "crypto_unittests": TestCrypto, |
609 "device": TestDevice, "device_unittests": TestDevice, | 664 "device": TestDevice, "device_unittests": TestDevice, |
610 "display": TestDisplay, "display_unittests": TestDisplay, | 665 "display": TestDisplay, "display_unittests": TestDisplay, |
611 "events": TestEvents, "events_unittests": TestEvents, | 666 "events": TestEvents, "events_unittests": TestEvents, |
| 667 "extensions": TestExtensions, |
612 "ffmpeg": TestFFmpeg, "ffmpeg_unittests": TestFFmpeg, | 668 "ffmpeg": TestFFmpeg, "ffmpeg_unittests": TestFFmpeg, |
613 "ffmpeg_regression_tests": TestFFmpegRegressions, | 669 "ffmpeg_regression_tests": TestFFmpegRegressions, |
614 "gcm": TestGCM, "gcm_unit_tests": TestGCM, | 670 "gcm": TestGCM, "gcm_unit_tests": TestGCM, |
| 671 "gin": TestGin, "gin_unittests": TestGin, |
| 672 "gfx": TestGfx, "gfx_unittests": TestGfx, |
| 673 "google_apis": TestGoogleApis, |
615 "gpu": TestGPU, "gpu_unittests": TestGPU, | 674 "gpu": TestGPU, "gpu_unittests": TestGPU, |
616 "ipc": TestIpc, "ipc_tests": TestIpc, | 675 "ipc": TestIpc, "ipc_tests": TestIpc, |
| 676 "installer_util": TestInstallerUtil, |
617 "interactive_ui": TestInteractiveUI, | 677 "interactive_ui": TestInteractiveUI, |
618 "jingle": TestJingle, "jingle_unittests": TestJingle, | 678 "jingle": TestJingle, "jingle_unittests": TestJingle, |
| 679 "keyboard": TestKeyboard, "keyboard_unittests": TestKeyboard, |
619 "layout": TestLayout, "layout_tests": TestLayout, | 680 "layout": TestLayout, "layout_tests": TestLayout, |
620 "media": TestMedia, "media_unittests": TestMedia, | 681 "media": TestMedia, "media_unittests": TestMedia, |
621 "message_center": TestMessageCenter, | 682 "message_center": TestMessageCenter, |
622 "message_center_unittests" : TestMessageCenter, | 683 "message_center_unittests" : TestMessageCenter, |
623 "mojo_apps_js": TestMojoAppsJS, | 684 "mojo_apps_js": TestMojoAppsJS, |
624 "mojo_common": TestMojoCommon, | 685 "mojo_common": TestMojoCommon, |
625 "mojo_js": TestMojoJS, | 686 "mojo_js": TestMojoJS, |
626 "mojo_system": TestMojoSystem, | 687 "mojo_system": TestMojoSystem, |
627 "mojo_public_system": TestMojoPublicSystem, | 688 "mojo_public_system": TestMojoPublicSystem, |
628 "mojo_public_utility": TestMojoPublicUtility, | 689 "mojo_public_utility": TestMojoPublicUtility, |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 | 781 |
721 for t in options.test: | 782 for t in options.test: |
722 tests = ChromeTests(options, args, t) | 783 tests = ChromeTests(options, args, t) |
723 ret = tests.Run() | 784 ret = tests.Run() |
724 if ret: return ret | 785 if ret: return ret |
725 return 0 | 786 return 0 |
726 | 787 |
727 | 788 |
728 if __name__ == "__main__": | 789 if __name__ == "__main__": |
729 sys.exit(_main()) | 790 sys.exit(_main()) |
OLD | NEW |