Show More
@@ -1084,8 +1084,11 b' class Test(unittest.TestCase):' | |||
|
1084 | 1084 | env["HGENCODINGMODE"] = "strict" |
|
1085 | 1085 | env["HGHOSTNAME"] = "test-hostname" |
|
1086 | 1086 | env['HGIPV6'] = str(int(self._useipv6)) |
|
1087 | if 'HGCATAPULTSERVERPIPE' not in env: | |
|
1088 |
en |
|
|
1087 | if 'HGTESTCATAPULTSERVERPIPE' not in env: | |
|
1088 | # If we don't have HGTESTCATAPULTSERVERPIPE explicitly set, pull the | |
|
1089 | # non-test one in as a default, otherwise set to devnull | |
|
1090 | env['HGTESTCATAPULTSERVERPIPE'] = \ | |
|
1091 | env.get('HGCATAPULTSERVERPIPE', os.devnull) | |
|
1089 | 1092 | |
|
1090 | 1093 | extraextensions = [] |
|
1091 | 1094 | for opt in self._extraconfigopts: |
@@ -1382,14 +1385,14 b' class TTest(Test):' | |||
|
1382 | 1385 | session = str(uuid.uuid4()) |
|
1383 | 1386 | if PYTHON3: |
|
1384 | 1387 | session = session.encode('ascii') |
|
1385 | hgcatapult = os.getenv('HGCATAPULTSERVERPIPE') | |
|
1388 | hgcatapult = os.getenv('HGTESTCATAPULTSERVERPIPE') | |
|
1386 | 1389 | def toggletrace(cmd=None): |
|
1387 | 1390 | if not hgcatapult or hgcatapult == os.devnull: |
|
1388 | 1391 | return |
|
1389 | 1392 | |
|
1390 | 1393 | if activetrace: |
|
1391 | 1394 | script.append( |
|
1392 | b'echo END %s %s >> "$HGCATAPULTSERVERPIPE"\n' % ( | |
|
1395 | b'echo END %s %s >> "$HGTESTCATAPULTSERVERPIPE"\n' % ( | |
|
1393 | 1396 | session, activetrace[0])) |
|
1394 | 1397 | if cmd is None: |
|
1395 | 1398 | return |
@@ -1400,7 +1403,7 b' class TTest(Test):' | |||
|
1400 | 1403 | quoted = shellquote(cmd.strip().decode('utf8')).encode('utf8') |
|
1401 | 1404 | quoted = quoted.replace(b'\\', b'\\\\') |
|
1402 | 1405 | script.append( |
|
1403 | b'echo START %s %s >> "$HGCATAPULTSERVERPIPE"\n' % ( | |
|
1406 | b'echo START %s %s >> "$HGTESTCATAPULTSERVERPIPE"\n' % ( | |
|
1404 | 1407 | session, quoted)) |
|
1405 | 1408 | activetrace[0:] = [quoted] |
|
1406 | 1409 | |
@@ -1438,18 +1441,19 b' class TTest(Test):' | |||
|
1438 | 1441 | # loop to exit and closes the pipe. Sigh. |
|
1439 | 1442 | script.append( |
|
1440 | 1443 | b'rtendtracing() {\n' |
|
1441 |
b' echo END %(session)s %(name)s >> |
|
|
1444 | b' echo END %(session)s %(name)s >> %(catapult)s\n' | |
|
1442 | 1445 | b' rm -f "$TESTTMP/.still-running"\n' |
|
1443 | 1446 | b'}\n' |
|
1444 | 1447 | b'trap "rtendtracing" 0\n' |
|
1445 | 1448 | b'touch "$TESTTMP/.still-running"\n' |
|
1446 | 1449 | b'while [ -f "$TESTTMP/.still-running" ]; do sleep 1; done ' |
|
1447 |
b'> |
|
|
1450 | b'> %(catapult)s &\n' | |
|
1448 | 1451 | b'HGCATAPULTSESSION=%(session)s ; export HGCATAPULTSESSION\n' |
|
1449 |
b'echo START %(session)s %(name)s >> |
|
|
1452 | b'echo START %(session)s %(name)s >> %(catapult)s\n' | |
|
1450 | 1453 | % { |
|
1451 | 1454 | 'name': self.name, |
|
1452 | 1455 | 'session': session, |
|
1456 | 'catapult': hgcatapult, | |
|
1453 | 1457 | } |
|
1454 | 1458 | ) |
|
1455 | 1459 |
General Comments 0
You need to be logged in to leave comments.
Login now