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

Side by Side Diff: Tools/Scripts/webkitpy/test/runner.py

Issue 478553002: Remove thirdparty/unittest2 from webkitpy and require python2.7. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | « Tools/Scripts/webkitpy/test/printer.py ('k') | Tools/Scripts/webkitpy/test/runner_unittest.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 # Copyright (C) 2012 Google, Inc. 1 # Copyright (C) 2012 Google, Inc.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions 4 # modification, are permitted provided that the following conditions
5 # are met: 5 # are met:
6 # 1. Redistributions of source code must retain the above copyright 6 # 1. Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # 2. Redistributions in binary form must reproduce the above copyright 8 # 2. Redistributions in binary form must reproduce the above copyright
9 # notice, this list of conditions and the following disclaimer in the 9 # notice, this list of conditions and the following disclaimer in the
10 # documentation and/or other materials provided with the distribution. 10 # documentation and/or other materials provided with the distribution.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 if errors: 65 if errors:
66 self.errors.append((test_name, errors)) 66 self.errors.append((test_name, errors))
67 self.printer.print_finished_test(source, test_name, delay, failures, err ors) 67 self.printer.print_finished_test(source, test_name, delay, failures, err ors)
68 68
69 69
70 class _Worker(object): 70 class _Worker(object):
71 def __init__(self, caller, loader, webkit_finder): 71 def __init__(self, caller, loader, webkit_finder):
72 self._caller = caller 72 self._caller = caller
73 self._loader = loader 73 self._loader = loader
74 74
75 # FIXME: unittest2 and coverage need to be in sys.path for their interna l imports to work. 75 # FIXME: coverage needs to be in sys.path for its internal imports to wo rk.
76 thirdparty_path = webkit_finder.path_from_webkit_base('Tools', 'Scripts' , 'webkitpy', 'thirdparty') 76 thirdparty_path = webkit_finder.path_from_webkit_base('Tools', 'Scripts' , 'webkitpy', 'thirdparty')
77 if not thirdparty_path in sys.path: 77 if not thirdparty_path in sys.path:
78 sys.path.append(thirdparty_path) 78 sys.path.append(thirdparty_path)
79 79
80 80
81 def handle(self, message_name, source, test_name): 81 def handle(self, message_name, source, test_name):
82 assert message_name == 'test' 82 assert message_name == 'test'
83 result = unittest.TestResult() 83 result = unittest.TestResult()
84 start = time.time() 84 start = time.time()
85 self._caller.post('started_test', test_name) 85 self._caller.post('started_test', test_name)
86 86
87 # We will need to rework this if a test_name results in multiple tests. 87 # We will need to rework this if a test_name results in multiple tests.
88 self._loader.loadTestsFromName(test_name, None).run(result) 88 self._loader.loadTestsFromName(test_name, None).run(result)
89 self._caller.post('finished_test', test_name, time.time() - start, 89 self._caller.post('finished_test', test_name, time.time() - start,
90 [failure[1] for failure in result.failures], [error[1] for error in result.errors]) 90 [failure[1] for failure in result.failures], [error[1] for error in result.errors])
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/test/printer.py ('k') | Tools/Scripts/webkitpy/test/runner_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698