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

Side by Side Diff: webkit/tools/layout_tests/webkitpy/layout_tests/update_expectations_from_dashboard.py

Issue 6015002: Rename WebKitTools->Tools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 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 | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2009 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 """Script to read in updates in JSON form from the layout test dashboard 6 """Script to read in updates in JSON form from the layout test dashboard
7 and apply them to test_expectations.txt. 7 and apply them to test_expectations.txt.
8 8
9 Usage: 9 Usage:
10 1. Go to http://src.chromium.org/viewvc/chrome/trunk/src/webkit/tools/ 10 1. Go to http://src.chromium.org/viewvc/chrome/trunk/src/webkit/tools/
(...skipping 12 matching lines...) Expand all
23 # 23 #
24 # Find the WebKit python directories and add them to the PYTHONPATH 24 # Find the WebKit python directories and add them to the PYTHONPATH
25 # 25 #
26 try: 26 try:
27 f = __file__ 27 f = __file__
28 except NameError: 28 except NameError:
29 f = sys.argv[0] 29 f = sys.argv[0]
30 30
31 this_file = os.path.abspath(f) 31 this_file = os.path.abspath(f)
32 base_dir = this_file[0:this_file.find('webkit'+ os.sep + 'tools')] 32 base_dir = this_file[0:this_file.find('webkit'+ os.sep + 'tools')]
33 webkitpy_dir = os.path.join(base_dir, 'third_party', 'WebKit', 'WebKitTools', 33 webkitpy_dir = os.path.join(base_dir, 'third_party', 'WebKit', 'Tools',
34 'Scripts') 34 'Scripts')
35 sys.path.append(webkitpy_dir) 35 sys.path.append(webkitpy_dir)
36 36
37 # 37 #
38 # Now import the python packages we need from WebKit 38 # Now import the python packages we need from WebKit
39 # 39 #
40 import webkitpy.thirdparty.simplejson as simplejson 40 import webkitpy.thirdparty.simplejson as simplejson
41 41
42 from webkitpy.layout_tests.layout_package import test_expectations 42 from webkitpy.layout_tests.layout_package import test_expectations
43 import webkitpy.layout_tests.port as port 43 import webkitpy.layout_tests.port as port
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 524
525 old_expectations = open(path_to_expectations).read() 525 old_expectations = open(path_to_expectations).read()
526 new_expectations = update_expectations(port_obj, old_expectations, updates) 526 new_expectations = update_expectations(port_obj, old_expectations, updates)
527 open(path_to_expectations, 'w').write(new_expectations) 527 open(path_to_expectations, 'w').write(new_expectations)
528 528
529 def usage(): 529 def usage():
530 print "usage: %s file_with_json_expectations_diff" % sys.argv[0] 530 print "usage: %s file_with_json_expectations_diff" % sys.argv[0]
531 531
532 if '__main__' == __name__: 532 if '__main__' == __name__:
533 main() 533 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698