equal
deleted
inserted
replaced
532 "--chg", |
532 "--chg", |
533 action="store_true", |
533 action="store_true", |
534 help="install and use chg wrapper in place of hg", |
534 help="install and use chg wrapper in place of hg", |
535 ) |
535 ) |
536 hgconf.add_argument( |
536 hgconf.add_argument( |
537 "--chg-debug", action="store_true", help="show chg debug logs", |
537 "--chg-debug", |
|
538 action="store_true", |
|
539 help="show chg debug logs", |
538 ) |
540 ) |
539 hgconf.add_argument("--compiler", help="compiler to build with") |
541 hgconf.add_argument("--compiler", help="compiler to build with") |
540 hgconf.add_argument( |
542 hgconf.add_argument( |
541 '--extra-config-opt', |
543 '--extra-config-opt', |
542 action="append", |
544 action="append", |
1191 self._daemonpids = [] |
1193 self._daemonpids = [] |
1192 |
1194 |
1193 if self._keeptmpdir: |
1195 if self._keeptmpdir: |
1194 log( |
1196 log( |
1195 '\nKeeping testtmp dir: %s\nKeeping threadtmp dir: %s' |
1197 '\nKeeping testtmp dir: %s\nKeeping threadtmp dir: %s' |
1196 % (_bytes2sys(self._testtmp), _bytes2sys(self._threadtmp),) |
1198 % ( |
|
1199 _bytes2sys(self._testtmp), |
|
1200 _bytes2sys(self._threadtmp), |
|
1201 ) |
1197 ) |
1202 ) |
1198 else: |
1203 else: |
1199 try: |
1204 try: |
1200 shutil.rmtree(self._testtmp) |
1205 shutil.rmtree(self._testtmp) |
1201 except OSError: |
1206 except OSError: |
2089 return True, True |
2094 return True, True |
2090 return retry, True |
2095 return retry, True |
2091 |
2096 |
2092 @staticmethod |
2097 @staticmethod |
2093 def parsehghaveoutput(lines): |
2098 def parsehghaveoutput(lines): |
2094 '''Parse hghave log lines. |
2099 """Parse hghave log lines. |
2095 |
2100 |
2096 Return tuple of lists (missing, failed): |
2101 Return tuple of lists (missing, failed): |
2097 * the missing/unknown features |
2102 * the missing/unknown features |
2098 * the features for which existence check failed''' |
2103 * the features for which existence check failed""" |
2099 missing = [] |
2104 missing = [] |
2100 failed = [] |
2105 failed = [] |
2101 for line in lines: |
2106 for line in lines: |
2102 if line.startswith(TTest.SKIPPED_PREFIX): |
2107 if line.startswith(TTest.SKIPPED_PREFIX): |
2103 line = line.splitlines()[0] |
2108 line = line.splitlines()[0] |
2153 self.color = False |
2158 self.color = False |
2154 else: # 'always', for testing purposes |
2159 else: # 'always', for testing purposes |
2155 self.color = pygmentspresent |
2160 self.color = pygmentspresent |
2156 |
2161 |
2157 def onStart(self, test): |
2162 def onStart(self, test): |
2158 """ Can be overriden by custom TestResult |
2163 """Can be overriden by custom TestResult""" |
2159 """ |
|
2160 |
2164 |
2161 def onEnd(self): |
2165 def onEnd(self): |
2162 """ Can be overriden by custom TestResult |
2166 """Can be overriden by custom TestResult""" |
2163 """ |
|
2164 |
2167 |
2165 def addFailure(self, test, reason): |
2168 def addFailure(self, test, reason): |
2166 self.failures.append((test, reason)) |
2169 self.failures.append((test, reason)) |
2167 |
2170 |
2168 if self._options.first: |
2171 if self._options.first: |
3166 vlog("# Using TESTDIR", _bytes2sys(self._testdir)) |
3169 vlog("# Using TESTDIR", _bytes2sys(self._testdir)) |
3167 vlog("# Using RUNTESTDIR", _bytes2sys(osenvironb[b'RUNTESTDIR'])) |
3170 vlog("# Using RUNTESTDIR", _bytes2sys(osenvironb[b'RUNTESTDIR'])) |
3168 vlog("# Using HGTMP", _bytes2sys(self._hgtmp)) |
3171 vlog("# Using HGTMP", _bytes2sys(self._hgtmp)) |
3169 vlog("# Using PATH", os.environ["PATH"]) |
3172 vlog("# Using PATH", os.environ["PATH"]) |
3170 vlog( |
3173 vlog( |
3171 "# Using", _bytes2sys(IMPL_PATH), _bytes2sys(osenvironb[IMPL_PATH]), |
3174 "# Using", |
|
3175 _bytes2sys(IMPL_PATH), |
|
3176 _bytes2sys(osenvironb[IMPL_PATH]), |
3172 ) |
3177 ) |
3173 vlog("# Writing to directory", _bytes2sys(self._outputdir)) |
3178 vlog("# Writing to directory", _bytes2sys(self._outputdir)) |
3174 |
3179 |
3175 try: |
3180 try: |
3176 return self._runtests(testdescs) or 0 |
3181 return self._runtests(testdescs) or 0 |