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

Side by Side Diff: tools/testing/frogpad/frogpad.py

Issue 9663028: make test.py invoked under xvfb-runw (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 | « frog/scripts/buildbot_annotated_steps.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/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 # 6 #
7 7
8 """ 8 """
9 Frogpad is used to compile .dart files to javascript. 9 Frogpad is used to compile .dart files to javascript.
10 10
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 def generate_js(self): 229 def generate_js(self):
230 drt = os.path.join(self.dart_dir, "client/tests/drt/DumpRenderTree") 230 drt = os.path.join(self.dart_dir, "client/tests/drt/DumpRenderTree")
231 if platform.system() == 'Darwin': 231 if platform.system() == 'Darwin':
232 drt += ".app" 232 drt += ".app"
233 elif platform.system() == 'Windows': 233 elif platform.system() == 'Windows':
234 raise Exception("frogpad does not run on Windows") 234 raise Exception("frogpad does not run on Windows")
235 235
236 check_exists(drt) 236 check_exists(drt)
237 args = [] 237 args = []
238 args.append("xvfb-run")
239 args.append("-a")
240 args.append(drt) 238 args.append(drt)
241 args.append(self.html_file) 239 args.append(self.html_file)
242 240
243 stdout = run_command(args) 241 stdout = run_command(args)
244 match = OUTPUT_JAVASCRIPT_REGEX.match(stdout) 242 match = OUTPUT_JAVASCRIPT_REGEX.match(stdout)
245 if not match: 243 if not match:
246 raise Exception("can't find regex in DumpRenderTree output") 244 raise Exception("can't find regex in DumpRenderTree output")
247 return match.group(1) 245 return match.group(1)
248 246
249 @staticmethod 247 @staticmethod
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 raise CommandFailedException(msg) 359 raise CommandFailedException(msg)
362 logging.debug("SUCCEEDED (%d bytes)" % len(stdout)) 360 logging.debug("SUCCEEDED (%d bytes)" % len(stdout))
363 return stdout 361 return stdout
364 362
365 363
366 def main(argv): 364 def main(argv):
367 Pad(argv) 365 Pad(argv)
368 366
369 if __name__ == "__main__": 367 if __name__ == "__main__":
370 sys.exit(main(sys.argv)) 368 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « frog/scripts/buildbot_annotated_steps.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698