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

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

Issue 9567032: Bring htmlconverter back up to date: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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
« no previous file with comments | « client/tools/update.py ('k') | no next file » | 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/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 subprocess 6 import subprocess
7 7
8 def HtmlConvert(infile): 8 def HtmlConvert(infile):
9 (head, tail) = os.path.split(infile) 9 (head, tail) = os.path.split(infile)
10 htmlconverter = os.path.join('..', '..', '..', 'client', 10 htmlconverter = os.path.join('..', '..', '..', 'client',
11 'tools', 'htmlconverter.py') 11 'tools', 'htmlconverter.py')
12 if head == 'tests': 12 if head == 'tests':
13 htmlconverter = os.path.join('..', htmlconverter) 13 htmlconverter = os.path.join('..', htmlconverter)
14 outdir = 'frog' 14 outdir = 'frog'
15 os.chdir('tests') 15 os.chdir('tests')
16 elif head == '': 16 elif head == '':
17 outdir = '.' 17 outdir = '.'
18 else: 18 else:
19 raise 'Illegal input: ' + infile 19 raise 'Illegal input: ' + infile
20 20
21 cmd = ['python', htmlconverter, tail, '-o', outdir, '--frog'] 21 cmd = ['python', htmlconverter, tail, '-o', outdir]
22 print 'Executing: ' + ' '.join(cmd) 22 print 'Executing: ' + ' '.join(cmd)
23 subprocess.call(cmd) 23 subprocess.call(cmd)
24 if head == 'tests': 24 if head == 'tests':
25 os.chdir('..') 25 os.chdir('..')
26 26
27 # Frog compile individual dom and html tests into tests/frog. 27 # Frog compile individual dom and html tests into tests/frog.
28 tests = glob.glob('tests/dom-*-*.html') 28 tests = glob.glob('tests/dom-*-*.html')
29 29
30 for test in tests: 30 for test in tests:
31 HtmlConvert(test) 31 HtmlConvert(test)
32 32
33 # Frog compile driver to index-js.html. 33 # Frog compile driver to index-js.html.
34 HtmlConvert('index.html') 34 HtmlConvert('index.html')
OLDNEW
« no previous file with comments | « client/tools/update.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698