comparison tests/run-tests.py @ 19243:050c6fae40d2

run-tests: regroup temp dir creation
author Matt Mackall <mpm@selenic.com>
date Fri, 24 May 2013 13:47:17 -0500
parents d25fc3264d44
children eee43d763f9f
comparison
equal deleted inserted replaced
19242:d25fc3264d44 19243:050c6fae40d2
916 return skip("unknown test type") 916 return skip("unknown test type")
917 917
918 # Make a tmp subdirectory to work in 918 # Make a tmp subdirectory to work in
919 testtmp = os.environ["TESTTMP"] = os.environ["HOME"] = \ 919 testtmp = os.environ["TESTTMP"] = os.environ["HOME"] = \
920 os.path.join(HGTMP, os.path.basename(test)) 920 os.path.join(HGTMP, os.path.basename(test))
921 os.mkdir(testtmp)
921 922
922 replacements = [ 923 replacements = [
923 (r':%s\b' % options.port, ':$HGPORT'), 924 (r':%s\b' % options.port, ':$HGPORT'),
924 (r':%s\b' % (options.port + 1), ':$HGPORT1'), 925 (r':%s\b' % (options.port + 1), ':$HGPORT1'),
925 (r':%s\b' % (options.port + 2), ':$HGPORT2'), 926 (r':%s\b' % (options.port + 2), ':$HGPORT2'),
932 '\\' + c 933 '\\' + c
933 for c in testtmp), '$TESTTMP')) 934 for c in testtmp), '$TESTTMP'))
934 else: 935 else:
935 replacements.append((re.escape(testtmp), '$TESTTMP')) 936 replacements.append((re.escape(testtmp), '$TESTTMP'))
936 937
937 os.mkdir(testtmp)
938 if options.time: 938 if options.time:
939 starttime = time.time() 939 starttime = time.time()
940 ret, out = runner(testpath, testtmp, options, replacements) 940 ret, out = runner(testpath, testtmp, options, replacements)
941 if options.time: 941 if options.time:
942 endtime = time.time() 942 endtime = time.time()