tests/run-tests.py
branchstable
changeset 9899 be574a37a8ae
parent 9707 38deec407f8d
child 9902 bf9d117d0010
child 9913 e3237af51def
equal deleted inserted replaced
9897:97eda2133a9b 9899:be574a37a8ae
    29 #      ./run-tests.py -j2 test-s*
    29 #      ./run-tests.py -j2 test-s*
    30 #  6) parallel, no coverage, local hg:
    30 #  6) parallel, no coverage, local hg:
    31 #      ./run-tests.py -j2 --local test-s*
    31 #      ./run-tests.py -j2 --local test-s*
    32 #  7) parallel, coverage, temp install:
    32 #  7) parallel, coverage, temp install:
    33 #      ./run-tests.py -j2 -c test-s*          # currently broken
    33 #      ./run-tests.py -j2 -c test-s*          # currently broken
    34 #  8) parallel, coverage, local install
    34 #  8) parallel, coverage, local install:
    35 #      ./run-tests.py -j2 -c --local test-s*  # unsupported (and broken)
    35 #      ./run-tests.py -j2 -c --local test-s*  # unsupported (and broken)
       
    36 #  9) parallel, custom tmp dir:
       
    37 #      ./run-tests.py -j2 --tmpdir /tmp/myhgtests
    36 #
    38 #
    37 # (You could use any subset of the tests: test-s* happens to match
    39 # (You could use any subset of the tests: test-s* happens to match
    38 # enough that it's worth doing parallel runs, few enough that it
    40 # enough that it's worth doing parallel runs, few enough that it
    39 # completes fairly quickly, includes both shell and Python scripts, and
    41 # completes fairly quickly, includes both shell and Python scripts, and
    40 # includes some scripts that run daemon processes.)
    42 # includes some scripts that run daemon processes.)
   637     for j, job in enumerate(jobs):
   639     for j, job in enumerate(jobs):
   638         if not job:
   640         if not job:
   639             continue
   641             continue
   640         rfd, wfd = os.pipe()
   642         rfd, wfd = os.pipe()
   641         childopts = ['--child=%d' % wfd, '--port=%d' % (options.port + j * 3)]
   643         childopts = ['--child=%d' % wfd, '--port=%d' % (options.port + j * 3)]
       
   644         childtmp = os.path.join(HGTMP, 'child%d' % j)
       
   645         childopts += ['--tmpdir', childtmp]
   642         cmdline = [PYTHON, sys.argv[0]] + opts + childopts + job
   646         cmdline = [PYTHON, sys.argv[0]] + opts + childopts + job
   643         vlog(' '.join(cmdline))
   647         vlog(' '.join(cmdline))
   644         fps[os.spawnvp(os.P_NOWAIT, cmdline[0], cmdline)] = os.fdopen(rfd, 'r')
   648         fps[os.spawnvp(os.P_NOWAIT, cmdline[0], cmdline)] = os.fdopen(rfd, 'r')
   645         os.close(wfd)
   649         os.close(wfd)
   646     failures = 0
   650     failures = 0