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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

Issue 2686303003: webkitpy: Remove --run-chunk and --run-part. (Closed)
Patch Set: webkitpy: Remove --run-chunk and --run-part. Created 3 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
OLDNEW
1 # Copyright (C) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged
3 # Copyright (C) 2011 Apple Inc. All rights reserved. 3 # Copyright (C) 2011 Apple Inc. All rights reserved.
4 # 4 #
5 # Redistribution and use in source and binary forms, with or without 5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are 6 # modification, are permitted provided that the following conditions are
7 # met: 7 # met:
8 # 8 #
9 # * Redistributions of source code must retain the above copyright 9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer. 10 # notice, this list of conditions and the following disclaimer.
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 dest="retry_failures", 355 dest="retry_failures",
356 action="store_false", 356 action="store_false",
357 help="Don't re-try any tests that produce unexpected results."), 357 help="Don't re-try any tests that produce unexpected results."),
358 optparse.make_option( 358 optparse.make_option(
359 "--num-retries", 359 "--num-retries",
360 type="int", 360 type="int",
361 default=3, 361 default=3,
362 help=("Number of times to retry failures, default is 3. Only rel evant when " 362 help=("Number of times to retry failures, default is 3. Only rel evant when "
363 "failure retries are enabled.")), 363 "failure retries are enabled.")),
364 optparse.make_option( 364 optparse.make_option(
365 "--run-chunk",
366 help="Run a specified chunk (n:l), the nth of len l, of the layo ut tests"),
367 optparse.make_option(
368 "--run-part",
369 help="Run a specified part (n:m), the nth of m parts, of the lay out tests"),
370 optparse.make_option(
371 "--total-shards", 365 "--total-shards",
372 type=int, 366 type=int,
373 help=('Total number of shards being used for this test run. ' 367 help=('Total number of shards being used for this test run. '
374 'Must be used with --shard-index. ' 368 'Must be used with --shard-index. '
375 '(The user of this script is responsible for spawning ' 369 '(The user of this script is responsible for spawning '
376 'all of the shards.)')), 370 'all of the shards.)')),
377 optparse.make_option( 371 optparse.make_option(
378 "--shard-index", 372 "--shard-index",
379 type=int, 373 type=int,
380 help=('Shard index [0..total_shards) of this test run. ' 374 help=('Shard index [0..total_shards) of this test run. '
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 532
539 if not options.test_list: 533 if not options.test_list:
540 options.test_list = [] 534 options.test_list = []
541 options.test_list.append(port.host.filesystem.join(port.layout_tests_dir (), 'SmokeTests')) 535 options.test_list.append(port.host.filesystem.join(port.layout_tests_dir (), 'SmokeTests'))
542 if not options.skipped: 536 if not options.skipped:
543 options.skipped = 'always' 537 options.skipped = 'always'
544 538
545 if not options.skipped: 539 if not options.skipped:
546 options.skipped = 'default' 540 options.skipped = 'default'
547 541
548 if not options.run_part: 542 if not options.total_shards and 'GTEST_TOTAL_SHARDS' in port.host.environ:
549 if not options.total_shards and 'GTEST_TOTAL_SHARDS' in port.host.enviro n: 543 options.total_shards = int(port.host.environ['GTEST_TOTAL_SHARDS'])
550 options.total_shards = int(port.host.environ['GTEST_TOTAL_SHARDS']) + 1 544 if not options.shard_index and 'GTEST_SHARD_INDEX' in port.host.environ:
551 if not options.shard_index and 'GTEST_SHARD_INDEX' in port.host.environ: 545 options.shard_index = int(port.host.environ['GTEST_SHARD_INDEX'])
552 options.shard_index = int(port.host.environ['GTEST_SHARD_INDEX'])
553 if options.shard_index is not None and options.total_shards is not None:
554 options.run_part = '%d:%d' % (int(options.shard_index) + 1,
555 int(options.total_shards))
556 546
557 if not options.seed: 547 if not options.seed:
558 options.seed = port.host.time() 548 options.seed = port.host.time()
559 549
560 def _run_tests(port, options, args, printer): 550 def _run_tests(port, options, args, printer):
561 _set_up_derived_options(port, options, args) 551 _set_up_derived_options(port, options, args)
562 manager = Manager(port, options, printer) 552 manager = Manager(port, options, printer)
563 printer.print_config(port.results_directory()) 553 printer.print_config(port.results_directory())
564 return manager.run(args) 554 return manager.run(args)
565 555
(...skipping 30 matching lines...) Expand all
596 _log.debug("\t%s", process) 586 _log.debug("\t%s", process)
597 587
598 return run_details 588 return run_details
599 589
600 finally: 590 finally:
601 printer.cleanup() 591 printer.cleanup()
602 592
603 if __name__ == '__main__': 593 if __name__ == '__main__':
604 exit_code = main(sys.argv[1:], sys.stdout, sys.stderr) 594 exit_code = main(sys.argv[1:], sys.stdout, sys.stderr)
605 sys.exit(exit_code) 595 sys.exit(exit_code)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698