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

Side by Side Diff: dart/compiler/tests/dartc/testcfg.py

Issue 8408002: Add a new variable environment for testing, to replace the misusage of 'arch'. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 1 month 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 | « dart/compiler/tests/dartc/dartc.status ('k') | dart/runtime/tests/vm/testcfg.py » ('j') | 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 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 import os 6 import os
7 from os.path import join, exists 7 from os.path import join, exists
8 import re 8 import re
9 9
10 import test 10 import test
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 'org.junit.runner.JUnitCore'] + self.classnames 59 'org.junit.runner.JUnitCore'] + self.classnames
60 60
61 def GetName(self): 61 def GetName(self):
62 return self.path[-1] 62 return self.path[-1]
63 63
64 64
65 class JUnitTestConfiguration(test.TestConfiguration): 65 class JUnitTestConfiguration(test.TestConfiguration):
66 def __init__(self, context, root): 66 def __init__(self, context, root):
67 super(JUnitTestConfiguration, self).__init__(context, root) 67 super(JUnitTestConfiguration, self).__init__(context, root)
68 68
69 def ListTests(self, current_path, path, mode, arch): 69 def ListTests(self, current_path, path, mode, arch, component):
70 test_path = current_path + ['junit_tests'] 70 test_path = current_path + ['junit_tests']
71 if not self.Contains(path, test_path): 71 if not self.Contains(path, test_path):
72 return [] 72 return []
73 classes = [] 73 classes = []
74 javatests_path = join(join(join(self.root, '..'), '..'), 'javatests') 74 javatests_path = join(join(join(self.root, '..'), '..'), 'javatests')
75 javatests_path = os.path.normpath(javatests_path) 75 javatests_path = os.path.normpath(javatests_path)
76 for root, dirs, files in os.walk(javatests_path): 76 for root, dirs, files in os.walk(javatests_path):
77 if root.endswith('com/google/dart/compiler/vm'): 77 if root.endswith('com/google/dart/compiler/vm'):
78 continue 78 continue
79 for f in [x for x in files if self.IsTest(x)]: 79 for f in [x for x in files if self.IsTest(x)]:
(...skipping 10 matching lines...) Expand all
90 return name.endswith('Tests.java') 90 return name.endswith('Tests.java')
91 91
92 def GetTestStatus(self, sections, defs): 92 def GetTestStatus(self, sections, defs):
93 status = join(self.root, 'dartc.status') 93 status = join(self.root, 'dartc.status')
94 if exists(status): 94 if exists(status):
95 test.ReadConfigurationInto(status, sections, defs) 95 test.ReadConfigurationInto(status, sections, defs)
96 96
97 97
98 def GetConfiguration(context, root): 98 def GetConfiguration(context, root):
99 return JUnitTestConfiguration(context, root) 99 return JUnitTestConfiguration(context, root)
OLDNEW
« no previous file with comments | « dart/compiler/tests/dartc/dartc.status ('k') | dart/runtime/tests/vm/testcfg.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698