##// END OF EJS Templates
run-tests: use count to calculate port to use...
Matt Mackall -
r19275:de44cf13 default
parent child Browse files
Show More
@@ -362,13 +362,13 b' def createhgrc(path, options):'
362 362 hgrc.write('[%s]\n%s\n' % (section, key))
363 363 hgrc.close()
364 364
365 def createenv(options, testtmp, threadtmp):
365 def createenv(options, testtmp, threadtmp, port):
366 366 env = os.environ.copy()
367 367 env['TESTTMP'] = testtmp
368 368 env['HOME'] = testtmp
369 env["HGPORT"] = str(options.port)
370 env["HGPORT1"] = str(options.port + 1)
371 env["HGPORT2"] = str(options.port + 2)
369 env["HGPORT"] = str(port)
370 env["HGPORT1"] = str(port + 1)
371 env["HGPORT2"] = str(port + 2)
372 372 env["HGRCPATH"] = os.path.join(threadtmp, '.hgrc')
373 373 env["DAEMON_PIDS"] = os.path.join(threadtmp, 'daemon.pids')
374 374 env["HGEDITOR"] = sys.executable + ' -c "import sys; sys.exit(0)"'
@@ -951,10 +951,11 b' def runone(options, test, count):'
951 951 os.mkdir(threadtmp)
952 952 os.mkdir(testtmp)
953 953
954 port = options.port + count * 3
954 955 replacements = [
955 (r':%s\b' % options.port, ':$HGPORT'),
956 (r':%s\b' % (options.port + 1), ':$HGPORT1'),
957 (r':%s\b' % (options.port + 2), ':$HGPORT2'),
956 (r':%s\b' % port, ':$HGPORT'),
957 (r':%s\b' % (port + 1), ':$HGPORT1'),
958 (r':%s\b' % (port + 2), ':$HGPORT2'),
958 959 ]
959 960 if os.name == 'nt':
960 961 replacements.append(
@@ -966,7 +967,7 b' def runone(options, test, count):'
966 967 else:
967 968 replacements.append((re.escape(testtmp), '$TESTTMP'))
968 969
969 env = createenv(options, testtmp, threadtmp)
970 env = createenv(options, testtmp, threadtmp, port)
970 971 createhgrc(env['HGRCPATH'], options)
971 972
972 973 if options.time:
General Comments 0
You need to be logged in to leave comments. Login now