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

Side by Side Diff: samples/third_party/dromaeo/generate_dart2js_tests.py

Issue 23201005: Revert revision 26149. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 import glob 3 import glob
4 import os 4 import os
5 import os.path 5 import os.path
6 import platform 6 import platform
7 import re 7 import re
8 import subprocess 8 import subprocess
9 import sys 9 import sys
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 print 'Converting %s to %s' % (tail, outfilename) 56 print 'Converting %s to %s' % (tail, outfilename)
57 for line in infile: 57 for line in infile:
58 result = re.search(pattern, line) 58 result = re.search(pattern, line)
59 if result: 59 if result:
60 testname = result.group(1) 60 testname = result.group(1)
61 dartname = testname + '.dart' 61 dartname = testname + '.dart'
62 jsname = '%s.%s.js' % (testname, compiler) 62 jsname = '%s.%s.js' % (testname, compiler)
63 outname = os.path.join(outdir, jsname) 63 outname = os.path.join(outdir, jsname)
64 Compile(dartname, outname, compiler) 64 Compile(dartname, outname, compiler)
65 script = '<script type="text/javascript" src="%s" defer>' % jsname 65 script = '<script type="text/javascript" src="%s">' % jsname
66 outfile.write(re.sub(pattern, script, line)) 66 outfile.write(re.sub(pattern, script, line))
67 else: 67 else:
68 outfile.write(line) 68 outfile.write(line)
69 69
70 if head == 'tests': 70 if head == 'tests':
71 os.chdir('..') 71 os.chdir('..')
72 72
73 # Compile individual html tests. 73 # Compile individual html tests.
74 tests = glob.glob('tests/dom-*-html.html') 74 tests = glob.glob('tests/dom-*-html.html')
75 75
76 for test in tests: 76 for test in tests:
77 HtmlConvert(test, 'dart2js') 77 HtmlConvert(test, 'dart2js')
78 78
79 # Compile driver to index-js.html. 79 # Compile driver to index-js.html.
80 HtmlConvert('index.html', 'dart2js') 80 HtmlConvert('index.html', 'dart2js')
OLDNEW
« no previous file with comments | « pkg/browser/lib/dart.js ('k') | sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698