OLD | NEW |
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 buildroot = utils.GetBuildRoot(self.context.os, self.mode, self.arch) | 43 buildroot = utils.GetBuildRoot(self.context.os, self.mode, self.arch) |
44 dartc_classes = [ os.path.join(buildroot, 'compiler', 'lib', 'dartc.jar'), | 44 dartc_classes = [ os.path.join(buildroot, 'compiler', 'lib', 'dartc.jar'), |
45 os.path.join(buildroot, 'compiler', 'lib', 'corelib.jar')
] | 45 os.path.join(buildroot, 'compiler', 'lib', 'corelib.jar')
] |
46 test_classes = os.path.join(buildroot, 'compiler-tests.jar') | 46 test_classes = os.path.join(buildroot, 'compiler-tests.jar') |
47 closure_jar = os.path.sep.join([buildroot, 'closure_out', 'compiler.jar']) | 47 closure_jar = os.path.sep.join([buildroot, 'closure_out', 'compiler.jar']) |
48 return os.path.pathsep.join( | 48 return os.path.pathsep.join( |
49 dartc_classes + [test_classes] + [closure_jar] + jars) | 49 dartc_classes + [test_classes] + [closure_jar] + jars) |
50 | 50 |
51 def GetCommand(self): | 51 def GetCommand(self): |
52 test_py = join(join(self.context.workspace, 'tools'), 'test.py') | 52 test_py = join(join(self.context.workspace, 'tools'), 'test.py') |
53 d8 = self.context.GetExecutable(self.mode, self.arch, 'd8') | 53 d8 = self.context.GetD8(self.mode, self.arch) |
54 # Note that it is important to run all the JUnit tests in the same process. | 54 # Note that it is important to run all the JUnit tests in the same process. |
55 # This way we have a chance of causing problems with static state early. | 55 # This way we have a chance of causing problems with static state early. |
56 return ['java', '-ea', '-classpath', self.GetClassPath(), | 56 return ['java', '-ea', '-classpath', self.GetClassPath(), |
57 '-Dcom.google.dart.runner.d8=' + d8, | 57 '-Dcom.google.dart.runner.d8=' + d8, |
58 '-Dcom.google.dart.corelib.SharedTests.test_py=' + test_py, | 58 '-Dcom.google.dart.corelib.SharedTests.test_py=' + test_py, |
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 |
(...skipping 26 matching lines...) Expand all Loading... |
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) |
OLD | NEW |