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

Side by Side Diff: tests/stub-generator/testcfg.py

Issue 8403040: Don't wait unnecessarily. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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
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 os 5 import os
6 import re 6 import re
7 import shutil 7 import shutil
8 import sys 8 import sys
9 import tempfile 9 import tempfile
10 10
(...skipping 21 matching lines...) Expand all
32 def GetStubs(self): 32 def GetStubs(self):
33 source = self.GetSource() 33 source = self.GetSource()
34 stub_classes = utils.ParseTestOptions(test.ISOLATE_STUB_PATTERN, source, 34 stub_classes = utils.ParseTestOptions(test.ISOLATE_STUB_PATTERN, source,
35 self.context.workspace) 35 self.context.workspace)
36 if stub_classes is None: 36 if stub_classes is None:
37 return (None, None, None) 37 return (None, None, None)
38 (interface, _, classes) = stub_classes[0].partition(':') 38 (interface, _, classes) = stub_classes[0].partition(':')
39 (interface, _, implementation) = interface.partition('+') 39 (interface, _, implementation) = interface.partition('+')
40 return (interface, classes, implementation) 40 return (interface, classes, implementation)
41 41
42 def IsFailureOutput(self, output):
floitsch 2011/11/02 14:34:27 Are you sure this is necessary? Do all components
Ben Laurie (Google) 2011/11/02 14:45:44 Yes, without it the test can exit early and appear
floitsch 2011/11/02 16:04:17 The testing-infrastructure should make sure this i
Ben Laurie (Google) 2011/11/02 21:09:34 How? AFAICS it does not achieve that: for example,
43 return output.exit_code != 0 or not '##DONE##' in output.stdout
44
42 def BeforeRun(self): 45 def BeforeRun(self):
43 if not self.context.generate: 46 if not self.context.generate:
44 return 47 return
45 (interface, classes, _) = self.GetStubs() 48 (interface, classes, _) = self.GetStubs()
46 if interface is None: 49 if interface is None:
47 return 50 return
48 d = join(self.GetPath(), 'generated') 51 d = join(self.GetPath(), 'generated')
49 if not isdir(d): 52 if not isdir(d):
50 os.mkdir(d) 53 os.mkdir(d)
51 tmpdir = tempfile.mkdtemp() 54 tmpdir = tempfile.mkdtemp()
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 test_path, 129 test_path,
127 join(root, f), 130 join(root, f),
128 mode, 131 mode,
129 arch, 132 arch,
130 component)) 133 component))
131 return tests 134 return tests
132 135
133 136
134 def GetConfiguration(context, root): 137 def GetConfiguration(context, root):
135 return DartStubTestConfiguration(context, root) 138 return DartStubTestConfiguration(context, root)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698