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

Side by Side Diff: frog/presubmit.py

Issue 8528015: change presubmit to run co19 tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: update co19-frog.status Created 9 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
« no previous file with comments | « no previous file | tests/co19/co19-frog.status » ('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) 2011, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 import os 6 import os
7 import subprocess 7 import subprocess
8 import sys 8 import sys
9 import time 9 import time
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 def main(args): 49 def main(args):
50 def b(s): 50 def b(s):
51 """Adds ANSI escape-code for bold-face""" 51 """Adds ANSI escape-code for bold-face"""
52 return "\033[1m%s\033[0m" % s 52 return "\033[1m%s\033[0m" % s
53 53
54 # VM Checked/CompileAll, produces checked 54 # VM Checked/CompileAll, produces checked
55 print 'Started' 55 print 'Started'
56 start = time.time() 56 start = time.time()
57 RunCommand('./frog.py', 57 RunCommand('./frog.py',
58 '--vm_flags=--compile_all --enable_type_checks --enable_asserts', 58 '--vm_flags=--compile_all --enable_type_checks --enable_asserts',
59 '--', '--enable_type_checks', '--out=frogsh', 'frog.dart') 59 '--', '--compile_all', '--enable_type_checks', '--out=frogsh',
60 'frog.dart')
60 elapsed = time.time() - start 61 elapsed = time.time() - start
61 mode = 'in checked mode + compile all' 62 mode = 'in checked mode + compile all'
62 print 'Compiling on Dart VM took %s seconds %s' % (b(elapsed), b(mode)) 63 print 'Compiling on Dart VM took %s seconds %s' % (b(elapsed), b(mode))
63 64
64 # VM Checked, produces checked
65 start = time.time()
66 RunCommand('./frog.py',
67 '--vm_flags=--enable_type_checks --enable_asserts',
68 '--', '--enable_type_checks', '--out=frogsh', 'frog.dart')
69 elapsed = time.time() - start
70 mode = 'in checked mode'
71 print 'Compiling on Dart VM took %s seconds %s' % (b(elapsed), b(mode))
72
73 # VM Normal, produces checked
74 start = time.time()
75 RunCommand('./frog.py', '--out=frogsh', '--enable_type_checks', 'frog.dart')
76 elapsed = time.time() - start
77 print 'Compiling on Dart VM took %s seconds' % b(elapsed)
78
79 # Selfhost Checked 65 # Selfhost Checked
80 start = time.time() 66 start = time.time()
81 RunCommand('./frogsh', '--out=frogsh', '--enable_type_checks', 'frog.dart', 67 RunCommand('./frogsh', '--out=frogsh', '--enable_type_checks', 'frog.dart',
82 '--enable_type_checks', 'tests/hello.dart') 68 '--enable_type_checks', 'tests/hello.dart')
83 elapsed = time.time() - start 69 elapsed = time.time() - start
84 size = os.path.getsize('./frogsh') / 1024 70 size = os.path.getsize('./frogsh') / 1024
85 print 'Bootstrapping took %s seconds %s' % (b(elapsed), b('in checked mode')) 71 print 'Bootstrapping took %s seconds %s' % (b(elapsed), b('in checked mode'))
86 print 'Generated %s frogsh is %s kB' % (b('checked'), b(size)) 72 print 'Generated %s frogsh is %s kB' % (b('checked'), b(size))
87 73
88 RunCommand('../tools/build.py', '--mode=release') 74 RunCommand('../tools/build.py', '--mode=release')
89 test_cmd = ['../tools/test.py', '--component=frog,frogsh,leg', 75 test_cmd = ['../tools/test.py', '--report', '--timeout=10',
90 '--report', '--timeout=5', '--progress=color', 76 '--progress=color', '--mode=release', '--checked']
91 '--mode=release', '--checked']
92 if args[1:]: 77 if args[1:]:
78 test_cmd.append('--component=frogsh,leg')
93 test_cmd.extend(args[1:]) 79 test_cmd.extend(args[1:])
80 RunCommand(*test_cmd, verbose=True)
94 else: 81 else:
95 test_cmd.extend(['language', 'corelib', 'leg', 'isolate', 82 # Run frog.py on the corelib tests, so we get some frog.py coverage.
96 'peg', 'leg_only', 'frog']) 83 cmd = test_cmd + ['--component=frog', 'corelib']
97 RunCommand(*test_cmd, verbose=True) 84 RunCommand(*cmd, verbose=True)
85 # Run leg and frogsh on most of the tests. TODO: add co19 here
86 cmd = test_cmd + ['--component=frogsh,leg', 'language', 'corelib', 'leg',
87 'isolate', 'peg', 'leg_only', 'frog']
88 RunCommand(*cmd, verbose=True)
89 # TODO: leg doesn't work with co19 yet, so run it separately
90 cmd = test_cmd + ['--component=frogsh', 'co19']
91 RunCommand(*cmd, verbose=True)
98 92
99 if __name__ == '__main__': 93 if __name__ == '__main__':
100 try: 94 try:
101 sys.exit(main(sys.argv)) 95 sys.exit(main(sys.argv))
102 except Error as e: 96 except Error as e:
103 sys.stderr.write('%s\n' % e) 97 sys.stderr.write('%s\n' % e)
104 sys.exit(1) 98 sys.exit(1)
OLDNEW
« no previous file with comments | « no previous file | tests/co19/co19-frog.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698