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

Side by Side Diff: tools/test.py

Issue 4082: Fixed test framework problem. (Closed)
Patch Set: Created 12 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
« no previous file with comments | « no previous file | no next file » | 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 # 2 #
3 # Copyright 2008 the V8 project authors. All rights reserved. 3 # Copyright 2008 the V8 project authors. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 12 matching lines...) Expand all
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 29
30 import imp 30 import imp
31 import optparse 31 import optparse
32 import os 32 import os
33 from os.path import join, dirname, abspath, basename, isdir 33 from os.path import join, dirname, abspath, basename, isdir, exists
34 import platform 34 import platform
35 import re 35 import re
36 import signal 36 import signal
37 import subprocess 37 import subprocess
38 import sys 38 import sys
39 import tempfile 39 import tempfile
40 import time 40 import time
41 import utils 41 import utils
42 42
43 43
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 suffix = value[pos+1:].split() 1057 suffix = value[pos+1:].split()
1058 def ExpandCommand(args): 1058 def ExpandCommand(args):
1059 return prefix + args + suffix 1059 return prefix + args + suffix
1060 return ExpandCommand 1060 return ExpandCommand
1061 1061
1062 1062
1063 BUILT_IN_TESTS = ['mjsunit', 'cctest'] 1063 BUILT_IN_TESTS = ['mjsunit', 'cctest']
1064 1064
1065 1065
1066 def GetSuites(test_root): 1066 def GetSuites(test_root):
1067 return [ f for f in os.listdir(test_root) if isdir(join(test_root, f)) ] 1067 def IsSuite(path):
1068 return isdir(path) and exists(join(path, 'testcfg.py'))
1069 return [ f for f in os.listdir(test_root) if IsSuite(join(test_root, f)) ]
1068 1070
1069 1071
1070 def Main(): 1072 def Main():
1071 parser = BuildOptions() 1073 parser = BuildOptions()
1072 (options, args) = parser.parse_args() 1074 (options, args) = parser.parse_args()
1073 if not ProcessOptions(options): 1075 if not ProcessOptions(options):
1074 parser.print_help() 1076 parser.print_help()
1075 return 1 1077 return 1
1076 1078
1077 workspace = abspath(join(dirname(sys.argv[0]), '..')) 1079 workspace = abspath(join(dirname(sys.argv[0]), '..'))
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 return 0 1162 return 0
1161 else: 1163 else:
1162 return 1 1164 return 1
1163 except KeyboardInterrupt: 1165 except KeyboardInterrupt:
1164 print "Interrupted" 1166 print "Interrupted"
1165 return 1 1167 return 1
1166 1168
1167 1169
1168 if __name__ == '__main__': 1170 if __name__ == '__main__':
1169 sys.exit(Main()) 1171 sys.exit(Main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698