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

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

Issue 8817025: Enable test script to specify different DRT binary (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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 | 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 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 # 4 #
5 5
6 import os 6 import os
7 import platform 7 import platform
8 import re 8 import re
9 import shutil 9 import shutil
10 import subprocess 10 import subprocess
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 f.close() 263 f.close()
264 264
265 app_output_file = self.GetTestScriptFile() 265 app_output_file = self.GetTestScriptFile()
266 f = open(app_output_file, 'w') 266 f = open(app_output_file, 'w')
267 f.write(self.GetTestContents(library_file)) 267 f.write(self.GetTestContents(library_file))
268 f.close() 268 f.close()
269 269
270 def GetRunCommand(self, fatal_static_type_errors=False): 270 def GetRunCommand(self, fatal_static_type_errors=False):
271 """Returns a command line to execute for the test.""" 271 """Returns a command line to execute for the test."""
272 fatal_static_type_errors = fatal_static_type_errors # shutup lint! 272 fatal_static_type_errors = fatal_static_type_errors # shutup lint!
273 # Find DRT
273 # For some reason, DRT needs to be called via an absolute path 274 # For some reason, DRT needs to be called via an absolute path
274 drt_location = os.path.join(self.root_path, 'client', 'tests', 'drt', 275 drt_location = None
275 'DumpRenderTree') 276 flags = self.vm_options
277 for flag in flags:
278 if flag.startswith('--browser='):
279 drt_location = flag.split('=')[1]
280 break
281 if drt_location is not None:
282 drt_location = os.path.abspath(drt_location)
283 else:
284 drt_location = os.path.join(self.root_path, 'client', 'tests', 'drt',
285 'DumpRenderTree')
276 286
277 # On Mac DumpRenderTree is a .app folder 287 # On Mac DumpRenderTree is a .app folder
278 if platform.system() == 'Darwin': 288 if platform.system() == 'Darwin':
279 drt_location += '.app/Contents/MacOS/DumpRenderTree' 289 drt_location += '.app/Contents/MacOS/DumpRenderTree'
280 290
281 drt_flags = ['--no-timeout'] 291 drt_flags = ['--no-timeout']
282 dart_flags = '--dart-flags=--enable_asserts --enable_type_checks ' 292 dart_flags = '--dart-flags=--enable_asserts --enable_type_checks '
283 dart_flags += ' '.join(self.vm_options) 293 dart_flags += ' '.join(flags)
Emily Fortuna 2011/12/06 19:08:19 Out of curiosity, why rename vm_options to the loc
284 294
285 drt_flags.append(dart_flags) 295 drt_flags.append(dart_flags)
286 296
287 html_output_file = os.path.join(self.GetHtmlPath(), self.GetHtmlName()) 297 html_output_file = os.path.join(self.GetHtmlPath(), self.GetHtmlName())
288 f = open(html_output_file, 'w') 298 f = open(html_output_file, 'w')
289 f.write(self.GetHtmlContents()) 299 f.write(self.GetHtmlContents())
290 f.close() 300 f.close()
291 301
292 drt_flags.append(html_output_file) 302 drt_flags.append(html_output_file)
293 303
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 return WebDriverArchitecture(root_path, arch, mode, component, test) 585 return WebDriverArchitecture(root_path, arch, mode, component, test)
576 586
577 elif component in ['vm', 'frog', 'frogsh']: 587 elif component in ['vm', 'frog', 'frogsh']:
578 return StandaloneArchitecture(root_path, arch, mode, component, test) 588 return StandaloneArchitecture(root_path, arch, mode, component, test)
579 589
580 elif component == 'leg': 590 elif component == 'leg':
581 return LegArchitecture(root_path, arch, mode, component, test) 591 return LegArchitecture(root_path, arch, mode, component, test)
582 592
583 elif component == 'dartc': 593 elif component == 'dartc':
584 return DartcArchitecture(root_path, arch, mode, component, test) 594 return DartcArchitecture(root_path, arch, mode, component, test)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698