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

Side by Side Diff: tools/test.py

Issue 6580038: [Isolates] Merge from bleeding_edge, revisions 5934-6100. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 10 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/gyp/v8.gyp ('k') | tools/v8.xcodeproj/project.pbxproj » ('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 # 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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 725
726 class Variable(Expression): 726 class Variable(Expression):
727 727
728 def __init__(self, name): 728 def __init__(self, name):
729 self.name = name 729 self.name = name
730 730
731 def GetOutcomes(self, env, defs): 731 def GetOutcomes(self, env, defs):
732 if self.name in env: return ListSet([env[self.name]]) 732 if self.name in env: return ListSet([env[self.name]])
733 else: return Nothing() 733 else: return Nothing()
734 734
735 def Evaluate(self, env, defs):
736 return env[self.name]
737
735 738
736 class Outcome(Expression): 739 class Outcome(Expression):
737 740
738 def __init__(self, name): 741 def __init__(self, name):
739 self.name = name 742 self.name = name
740 743
741 def GetOutcomes(self, env, defs): 744 def GetOutcomes(self, env, defs):
742 if self.name in defs: 745 if self.name in defs:
743 return defs[self.name].GetOutcomes(env, defs) 746 return defs[self.name].GetOutcomes(env, defs)
744 else: 747 else:
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 dest="store_unexpected_output", default=True, action="store_true") 1178 dest="store_unexpected_output", default=True, action="store_true")
1176 result.add_option("--no-store-unexpected-output", 1179 result.add_option("--no-store-unexpected-output",
1177 help="Deletes the temporary JS files from tests that fails", 1180 help="Deletes the temporary JS files from tests that fails",
1178 dest="store_unexpected_output", action="store_false") 1181 dest="store_unexpected_output", action="store_false")
1179 result.add_option("--stress-only", 1182 result.add_option("--stress-only",
1180 help="Only run tests with --always-opt --stress-opt", 1183 help="Only run tests with --always-opt --stress-opt",
1181 default=False, action="store_true") 1184 default=False, action="store_true")
1182 result.add_option("--nostress", 1185 result.add_option("--nostress",
1183 help="Don't run crankshaft --always-opt --stress-op test", 1186 help="Don't run crankshaft --always-opt --stress-op test",
1184 default=False, action="store_true") 1187 default=False, action="store_true")
1188 result.add_option("--crankshaft",
1189 help="Run with the --crankshaft flag",
1190 default=False, action="store_true")
1191 result.add_option("--noprof", help="Disable profiling support",
1192 default=False)
1185 return result 1193 return result
1186 1194
1187 1195
1188 def ProcessOptions(options): 1196 def ProcessOptions(options):
1189 global VERBOSE 1197 global VERBOSE
1190 VERBOSE = options.verbose 1198 VERBOSE = options.verbose
1191 options.mode = options.mode.split(',') 1199 options.mode = options.mode.split(',')
1192 for mode in options.mode: 1200 for mode in options.mode:
1193 if not mode in ['debug', 'release']: 1201 if not mode in ['debug', 'release']:
1194 print "Unknown mode %s" % mode 1202 print "Unknown mode %s" % mode
(...skipping 14 matching lines...) Expand all
1209 if options.arch == 'none': 1217 if options.arch == 'none':
1210 options.arch = ARCH_GUESS 1218 options.arch = ARCH_GUESS
1211 options.scons_flags.append("arch=" + options.arch) 1219 options.scons_flags.append("arch=" + options.arch)
1212 if options.snapshot: 1220 if options.snapshot:
1213 options.scons_flags.append("snapshot=on") 1221 options.scons_flags.append("snapshot=on")
1214 global VARIANT_FLAGS 1222 global VARIANT_FLAGS
1215 if options.stress_only: 1223 if options.stress_only:
1216 VARIANT_FLAGS = [['--stress-opt', '--always-opt']] 1224 VARIANT_FLAGS = [['--stress-opt', '--always-opt']]
1217 if options.nostress: 1225 if options.nostress:
1218 VARIANT_FLAGS = [[],['--nocrankshaft']] 1226 VARIANT_FLAGS = [[],['--nocrankshaft']]
1227 if options.crankshaft:
1228 if options.special_command:
1229 options.special_command += " --crankshaft"
1230 else:
1231 options.special_command = "@--crankshaft"
1232 if options.noprof:
1233 options.scons_flags.append("prof=off")
1234 options.scons_flags.append("profilingsupport=off")
1219 return True 1235 return True
1220 1236
1221 1237
1222 REPORT_TEMPLATE = """\ 1238 REPORT_TEMPLATE = """\
1223 Total: %(total)i tests 1239 Total: %(total)i tests
1224 * %(skipped)4d tests will be skipped 1240 * %(skipped)4d tests will be skipped
1225 * %(nocrash)4d tests are expected to be flaky but not crash 1241 * %(nocrash)4d tests are expected to be flaky but not crash
1226 * %(pass)4d tests are expected to pass 1242 * %(pass)4d tests are expected to pass
1227 * %(fail_ok)4d tests are expected to fail that we won't fix 1243 * %(fail_ok)4d tests are expected to fail that we won't fix
1228 * %(fail)4d tests are expected to fail that we should fix\ 1244 * %(fail)4d tests are expected to fail that we should fix\
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 globally_unused_rules = None 1375 globally_unused_rules = None
1360 for path in paths: 1376 for path in paths:
1361 for mode in options.mode: 1377 for mode in options.mode:
1362 if not exists(context.GetVm(mode)): 1378 if not exists(context.GetVm(mode)):
1363 print "Can't find shell executable: '%s'" % context.GetVm(mode) 1379 print "Can't find shell executable: '%s'" % context.GetVm(mode)
1364 continue 1380 continue
1365 env = { 1381 env = {
1366 'mode': mode, 1382 'mode': mode,
1367 'system': utils.GuessOS(), 1383 'system': utils.GuessOS(),
1368 'arch': options.arch, 1384 'arch': options.arch,
1369 'simulator': options.simulator 1385 'simulator': options.simulator,
1386 'crankshaft': options.crankshaft
1370 } 1387 }
1371 test_list = root.ListTests([], path, context, mode) 1388 test_list = root.ListTests([], path, context, mode)
1372 unclassified_tests += test_list 1389 unclassified_tests += test_list
1373 (cases, unused_rules, all_outcomes) = config.ClassifyTests(test_list, env) 1390 (cases, unused_rules, all_outcomes) = config.ClassifyTests(test_list, env)
1374 if globally_unused_rules is None: 1391 if globally_unused_rules is None:
1375 globally_unused_rules = set(unused_rules) 1392 globally_unused_rules = set(unused_rules)
1376 else: 1393 else:
1377 globally_unused_rules = globally_unused_rules.intersection(unused_rules) 1394 globally_unused_rules = globally_unused_rules.intersection(unused_rules)
1378 all_cases += cases 1395 all_cases += cases
1379 all_unused.append(unused_rules) 1396 all_unused.append(unused_rules)
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
1430 for entry in timed_tests[:20]: 1447 for entry in timed_tests[:20]:
1431 t = FormatTime(entry.duration) 1448 t = FormatTime(entry.duration)
1432 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) 1449 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel()))
1433 index += 1 1450 index += 1
1434 1451
1435 return result 1452 return result
1436 1453
1437 1454
1438 if __name__ == '__main__': 1455 if __name__ == '__main__':
1439 sys.exit(Main()) 1456 sys.exit(Main())
OLDNEW
« no previous file with comments | « tools/gyp/v8.gyp ('k') | tools/v8.xcodeproj/project.pbxproj » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698