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

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

Issue 8226016: Add the ability to run tests with several sets of VM flags (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments from ngeoffray@ Created 9 years, 2 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 | « tools/testing/architecture.py ('k') | tools/testing/test_configuration.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 # 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 import atexit 5 import atexit
6 import fileinput 6 import fileinput
7 import os 7 import os
8 import test 8 import test
9 import platform 9 import platform
10 import re 10 import re
11 import sys 11 import sys
12 import tempfile 12 import tempfile
13 13
14 import architecture 14 import architecture
15 import test 15 import test
16 import utils 16 import utils
17 17
18 from os.path import join, exists, basename 18 from os.path import join, exists, basename
19 19
20 import utils 20 import utils
21 21
22 class Error(Exception): 22 class Error(Exception):
23 pass 23 pass
24 24
25 25
26 class StandardTestCase(test.TestCase): 26 class StandardTestCase(test.TestCase):
27 def __init__(self, context, path, filename, mode, arch): 27 def __init__(self, context, path, filename, mode, arch, vm_options = []):
28 super(StandardTestCase, self).__init__(context, path) 28 super(StandardTestCase, self).__init__(context, path)
29 self.filename = filename 29 self.filename = filename
30 self.mode = mode 30 self.mode = mode
31 self.arch = arch 31 self.arch = arch
32 self.run_arch = architecture.GetArchitecture(self.arch, self.mode, 32 self.run_arch = architecture.GetArchitecture(self.arch, self.mode,
33 self.filename) 33 self.filename)
34 for flag in context.flags: 34 for flag in context.flags:
35 self.run_arch.vm_options.append(flag) 35 self.run_arch.vm_options.append(flag)
36 36
37 for flag in vm_options:
38 self.run_arch.vm_options.append(flag)
39
37 def IsNegative(self): 40 def IsNegative(self):
38 return self.GetName().endswith("NegativeTest") 41 return self.GetName().endswith("NegativeTest")
39 42
40 def GetLabel(self): 43 def GetLabel(self):
41 return "%s%s %s" % (self.mode, self.arch, '/'.join(self.path)) 44 return "%s%s %s" % (self.mode, self.arch, '/'.join(self.path))
42 45
43 def GetCommand(self): 46 def GetCommand(self):
44 return self.run_arch.GetRunCommand(); 47 return self.run_arch.GetRunCommand();
45 48
46 def GetName(self): 49 def GetName(self):
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 cmd += ['-check-only', 136 cmd += ['-check-only',
134 '-fatal-type-errors', 137 '-fatal-type-errors',
135 '-Werror', 138 '-Werror',
136 '-out', self.temp_dir, 139 '-out', self.temp_dir,
137 self.filename] 140 self.filename]
138 141
139 return cmd 142 return cmd
140 143
141 def GetName(self): 144 def GetName(self):
142 return self.path[-1] 145 return self.path[-1]
OLDNEW
« no previous file with comments | « tools/testing/architecture.py ('k') | tools/testing/test_configuration.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698