OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2012 the V8 project authors. All rights reserved. | 3 # Copyright 2012 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 for s in suites: | 410 for s in suites: |
411 s.ReadStatusFile(variables) | 411 s.ReadStatusFile(variables) |
412 s.ReadTestCases(ctx) | 412 s.ReadTestCases(ctx) |
413 if len(args) > 0: | 413 if len(args) > 0: |
414 s.FilterTestCasesByArgs(args) | 414 s.FilterTestCasesByArgs(args) |
415 all_tests += s.tests | 415 all_tests += s.tests |
416 s.FilterTestCasesByStatus(False) | 416 s.FilterTestCasesByStatus(False) |
417 test_backup[s] = s.tests | 417 test_backup[s] = s.tests |
418 analysis_flags = ["--deopt-every-n-times", "%d" % MAX_DEOPT, | 418 analysis_flags = ["--deopt-every-n-times", "%d" % MAX_DEOPT, |
419 "--print-deopt-stress"] | 419 "--print-deopt-stress"] |
420 s.tests = [ t.CopyAddingFlags(analysis_flags) for t in s.tests ] | 420 s.tests = [ t.CopyAddingFlags(t.variant, analysis_flags) for t in s.tests ] |
421 num_tests += len(s.tests) | 421 num_tests += len(s.tests) |
422 for t in s.tests: | 422 for t in s.tests: |
423 t.id = test_id | 423 t.id = test_id |
424 test_id += 1 | 424 test_id += 1 |
425 | 425 |
426 if num_tests == 0: | 426 if num_tests == 0: |
427 print "No tests to run." | 427 print "No tests to run." |
428 return 0 | 428 return 0 |
429 | 429 |
430 print(">>> Collection phase") | 430 print(">>> Collection phase") |
(...skipping 26 matching lines...) Expand all Loading... |
457 for t in test_backup[s]: | 457 for t in test_backup[s]: |
458 max_deopt = test_results.get(t.path, 0) | 458 max_deopt = test_results.get(t.path, 0) |
459 if max_deopt == 0: | 459 if max_deopt == 0: |
460 continue | 460 continue |
461 n_deopt = CalculateNTests(max_deopt, options) | 461 n_deopt = CalculateNTests(max_deopt, options) |
462 distribution = dist.Distribute(n_deopt, max_deopt) | 462 distribution = dist.Distribute(n_deopt, max_deopt) |
463 if options.verbose: | 463 if options.verbose: |
464 print "%s %s" % (t.path, distribution) | 464 print "%s %s" % (t.path, distribution) |
465 for i in distribution: | 465 for i in distribution: |
466 fuzzing_flags = ["--deopt-every-n-times", "%d" % i] | 466 fuzzing_flags = ["--deopt-every-n-times", "%d" % i] |
467 s.tests.append(t.CopyAddingFlags(fuzzing_flags)) | 467 s.tests.append(t.CopyAddingFlags(t.variant, fuzzing_flags)) |
468 num_tests += len(s.tests) | 468 num_tests += len(s.tests) |
469 for t in s.tests: | 469 for t in s.tests: |
470 t.id = test_id | 470 t.id = test_id |
471 test_id += 1 | 471 test_id += 1 |
472 | 472 |
473 if num_tests == 0: | 473 if num_tests == 0: |
474 print "No tests to run." | 474 print "No tests to run." |
475 return 0 | 475 return 0 |
476 | 476 |
477 print(">>> Deopt fuzzing phase (%d test cases)" % num_tests) | 477 print(">>> Deopt fuzzing phase (%d test cases)" % num_tests) |
478 progress_indicator = progress.PROGRESS_INDICATORS[options.progress]() | 478 progress_indicator = progress.PROGRESS_INDICATORS[options.progress]() |
479 runner = execution.Runner(suites, progress_indicator, ctx) | 479 runner = execution.Runner(suites, progress_indicator, ctx) |
480 | 480 |
481 code = runner.Run(options.j) | 481 code = runner.Run(options.j) |
482 return exit_code or code | 482 return exit_code or code |
483 | 483 |
484 | 484 |
485 if __name__ == "__main__": | 485 if __name__ == "__main__": |
486 sys.exit(Main()) | 486 sys.exit(Main()) |
OLD | NEW |