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

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

Issue 9036009: Add client/tests/client web tests to the test.dart test script. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments, fix Windows case. Created 8 years, 11 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 # 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 """Common Testconfiguration subclasses used to define a class of tests.""" 5 """Common Testconfiguration subclasses used to define a class of tests."""
6 6
7 import atexit 7 import atexit
8 import fileinput 8 import fileinput
9 import os 9 import os
10 import re 10 import re
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 class CompilationTestConfiguration(test.TestConfiguration): 262 class CompilationTestConfiguration(test.TestConfiguration):
263 """Configuration that searches specific directories for apps to compile. 263 """Configuration that searches specific directories for apps to compile.
264 264
265 Expects a status file named dartc.status 265 Expects a status file named dartc.status
266 """ 266 """
267 267
268 def __init__(self, context, root): 268 def __init__(self, context, root):
269 super(CompilationTestConfiguration, self).__init__(context, root) 269 super(CompilationTestConfiguration, self).__init__(context, root)
270 270
271 def ListTests(self, current_path, path, mode, arch, component): 271 def ListTests(self, current_path, path, mode, arch, component):
272 """Searches for *Test.dart files and returns list of TestCases.""" 272 """Searches for files satisfying IsTest() and returns list of TestCases."""
273 tests = [] 273 tests = []
274 client_path = os.path.normpath(os.path.join(self.root, '..', '..')) 274 client_path = os.path.normpath(os.path.join(self.root, '..', '..'))
275 275
276 for src_dir in self.SourceDirs(): 276 for src_dir in self.SourceDirs():
277 for root, dirs, files in os.walk(os.path.join(client_path, src_dir)): 277 for root, dirs, files in os.walk(os.path.join(client_path, src_dir)):
278 ignore_dirs = [d for d in dirs if d.startswith('.')] 278 ignore_dirs = [d for d in dirs if d.startswith('.')]
279 for d in ignore_dirs: 279 for d in ignore_dirs:
280 dirs.remove(d) 280 dirs.remove(d)
281 for f in files: 281 for f in files:
282 filename = [os.path.basename(client_path)] 282 filename = [os.path.basename(client_path)]
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 317
318 def GetTestStatus(self, sections, defs): 318 def GetTestStatus(self, sections, defs):
319 status = os.path.join(self.root, 'dartc.status') 319 status = os.path.join(self.root, 'dartc.status')
320 if os.path.exists(status): 320 if os.path.exists(status):
321 test.ReadConfigurationInto(status, sections, defs) 321 test.ReadConfigurationInto(status, sections, defs)
322 322
323 def _Cleanup(self, tests): 323 def _Cleanup(self, tests):
324 if not utils.Daemonize(): return 324 if not utils.Daemonize(): return
325 os.execlp('rm', *(['rm', '-rf'] + [t.temp_dir for t in tests])) 325 os.execlp('rm', *(['rm', '-rf'] + [t.temp_dir for t in tests]))
326 raise 326 raise
OLDNEW
« tools/testing/dart/test_suite.dart ('K') | « tools/testing/dart/test_suite.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698