view tests/seq.py @ 27394:b4d7743e174a

run-tests: add more scheduling weight hints The scheduler would like to order test execution by expected run-time, but doesn't know much about how long a test will run. It thus uses test size as a proxy for run-time. By tweaking these weights we can keep CPUs more evenly busy and thus finish sooner. In particular, this change pushes the three currently longest-running tests closer to the beginning: test-largefiles-update.t test-run-tests.t test-gendoc.t As the largefiles test is currently the long pole of the test suite with higher -j factors, the sooner it's started, the sooner the tests can end. We also up the weight on some shorter but long-running tests that could have previously delayed completion with low -j factors by running very close to the end.
author Matt Mackall <mpm@selenic.com>
date Fri, 04 Dec 2015 17:05:20 -0600
parents f554f89a2038
children ff3be5a325bc
line wrap: on
line source

#!/usr/bin/env python
#
# A portable replacement for 'seq'
#
# Usage:
#   seq STOP              [1, STOP] stepping by 1
#   seq START STOP        [START, STOP] stepping by 1
#   seq START STEP STOP   [START, STOP] stepping by STEP

import sys

start = 1
if len(sys.argv) > 2:
    start = int(sys.argv[1])

step = 1
if len(sys.argv) > 3:
    step = int(sys.argv[2])

stop = int(sys.argv[-1]) + 1

for i in xrange(start, stop, step):
    print i