OLD | NEW |
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 optparse | 6 import optparse |
7 import os | 7 import os |
8 import stat | 8 import stat |
9 import subprocess | 9 import subprocess |
10 import sys | 10 import sys |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 start = time.time() | 90 start = time.time() |
91 RunCommand('./frog.py', '--', '--out=minfrog', 'minfrog.dart') | 91 RunCommand('./frog.py', '--', '--out=minfrog', 'minfrog.dart') |
92 elapsed = time.time() - start | 92 elapsed = time.time() - start |
93 mode = 'in production mode' | 93 mode = 'in production mode' |
94 print 'Compiling minfrog on Dart VM took %s seconds %s' % ( | 94 print 'Compiling minfrog on Dart VM took %s seconds %s' % ( |
95 b('%.1f' % elapsed), b(mode)) | 95 b('%.1f' % elapsed), b(mode)) |
96 os.chmod('./minfrog', EXECUTABLE) | 96 os.chmod('./minfrog', EXECUTABLE) |
97 | 97 |
98 # Selfhost Production | 98 # Selfhost Production |
99 start = time.time() | 99 start = time.time() |
100 RunCommand('./minfrog', '--out=minfrog', '--warnings_as_errors', | 100 # TODO(jmesserly): --warnings_as_errors disabled until corelib is moved to |
| 101 # new factory syntax. |
| 102 RunCommand('./minfrog', '--out=minfrog', # '--warnings_as_errors', |
101 'minfrog.dart', 'tests/hello.dart', verbose=True) | 103 'minfrog.dart', 'tests/hello.dart', verbose=True) |
102 elapsed = time.time() - start | 104 elapsed = time.time() - start |
103 size = os.path.getsize('./minfrog') / 1024 | 105 size = os.path.getsize('./minfrog') / 1024 |
104 print 'Bootstrapping minfrog took %s seconds %s' % (b('%.1f' % elapsed), | 106 print 'Bootstrapping minfrog took %s seconds %s' % (b('%.1f' % elapsed), |
105 b('in production mode')) | 107 b('in production mode')) |
106 print 'Generated %s minfrog is %s kB' % (b('production'), b(size)) | 108 print 'Generated %s minfrog is %s kB' % (b('production'), b(size)) |
107 | 109 |
108 | 110 |
109 def main(): | 111 def main(): |
110 (options, args) = BuildOptions().parse_args() | 112 (options, args) = BuildOptions().parse_args() |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 cmd = test_cmd + ['--component=leg', | 148 cmd = test_cmd + ['--component=leg', |
147 'language', 'corelib', 'leg', 'leg_only'] | 149 'language', 'corelib', 'leg', 'leg_only'] |
148 RunCommand(*cmd, verbose=True) | 150 RunCommand(*cmd, verbose=True) |
149 | 151 |
150 if __name__ == '__main__': | 152 if __name__ == '__main__': |
151 try: | 153 try: |
152 sys.exit(main()) | 154 sys.exit(main()) |
153 except Error as e: | 155 except Error as e: |
154 sys.stderr.write('%s\n' % e) | 156 sys.stderr.write('%s\n' % e) |
155 sys.exit(1) | 157 sys.exit(1) |
OLD | NEW |