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

Side by Side Diff: tools/testing/drt-trampoline.py

Issue 11368128: Take 2 of splitting html tests into subtests. Had to make two changes to drt to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 # 4 #
5 # For now we have to use this trampoline to turn --dart-flags command line 5 # For now we have to use this trampoline to turn --dart-flags command line
6 # switch into env variable DART_FLAGS. Eventually, DumpRenderTree should 6 # switch into env variable DART_FLAGS. Eventually, DumpRenderTree should
7 # support --dart-flags and this hack may go away. 7 # support --dart-flags and this hack may go away.
8 # 8 #
9 # Expected invocation: python drt-trampoline.py <path to DRT> <DRT command line> 9 # Expected invocation: python drt-trampoline.py <path to DRT> <DRT command line>
10 10
(...skipping 23 matching lines...) Expand all
34 env['DART_FLAGS'] = arg[len(DART_FLAGS_PREFIX):] 34 env['DART_FLAGS'] = arg[len(DART_FLAGS_PREFIX):]
35 elif arg.startswith(OUT_EXPECTATION_PREFIX): 35 elif arg.startswith(OUT_EXPECTATION_PREFIX):
36 out_expected_file = arg[len(OUT_EXPECTATION_PREFIX):] 36 out_expected_file = arg[len(OUT_EXPECTATION_PREFIX):]
37 if out_expected_file.endswith('.png'): 37 if out_expected_file.endswith('.png'):
38 cmd.append('--notree') 38 cmd.append('--notree')
39 is_png = True 39 is_png = True
40 elif not out_expected_file.endswith('.txt'): 40 elif not out_expected_file.endswith('.txt'):
41 raise Exception( 41 raise Exception(
42 'Bad file expectation (%s), ' % out_expected_file 42 'Bad file expectation (%s), ' % out_expected_file
43 + 'please specify either a .txt or a .png file') 43 + 'please specify either a .txt or a .png file')
44 elif arg.endswith('.html'): 44 elif '.html' in arg:
45 test_file = arg 45 test_file = arg
46 else: 46 else:
47 cmd.append(arg) 47 cmd.append(arg)
48 48
49 if is_png: 49 if is_png:
50 # pixel tests are specified by running DRT "foo.html'-p" 50 # pixel tests are specified by running DRT "foo.html'-p"
51 cmd.append(test_file + "'-p") 51 cmd.append(test_file + "'-p")
52 else: 52 else:
53 cmd.append(test_file) 53 cmd.append(test_file)
54 54
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 print 'You can update expectations by running:\n' 108 print 'You can update expectations by running:\n'
109 print 'cp %s %s\n' % (out_file, out_expected_file) 109 print 'cp %s %s\n' % (out_file, out_expected_file)
110 print '#EOF' 110 print '#EOF'
111 111
112 if __name__ == '__main__': 112 if __name__ == '__main__':
113 try: 113 try:
114 sys.exit(main(sys.argv)) 114 sys.exit(main(sys.argv))
115 except StandardError as e: 115 except StandardError as e:
116 print 'Fail: ' + str(e) 116 print 'Fail: ' + str(e)
117 sys.exit(1) 117 sys.exit(1)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698