##// END OF EJS Templates
run-tests: use symbolic constant instead of arbitrary number line matching...
marmoute -
r43134:141bb77b default
parent child Browse files
Show More
@@ -1302,6 +1302,10 b' bchr = chr'
1302 if PYTHON3:
1302 if PYTHON3:
1303 bchr = lambda x: bytes([x])
1303 bchr = lambda x: bytes([x])
1304
1304
1305 WARN_UNDEFINED = 1
1306 WARN_YES = 2
1307 WARN_NO = 3
1308
1305 class TTest(Test):
1309 class TTest(Test):
1306 """A "t test" is a test backed by a .t file."""
1310 """A "t test" is a test backed by a .t file."""
1307
1311
@@ -1601,9 +1605,9 b' class TTest(Test):'
1601
1605
1602 def _processoutput(self, exitcode, output, salt, after, expected):
1606 def _processoutput(self, exitcode, output, salt, after, expected):
1603 # Merge the script output back into a unified test.
1607 # Merge the script output back into a unified test.
1604 warnonly = 1 # 1: not yet; 2: yes; 3: for sure not
1608 warnonly = WARN_UNDEFINED # 1: not yet; 2: yes; 3: for sure not
1605 if exitcode != 0:
1609 if exitcode != 0:
1606 warnonly = 3
1610 warnonly = WARN_NO
1607
1611
1608 pos = -1
1612 pos = -1
1609 postout = []
1613 postout = []
@@ -1670,9 +1674,9 b' class TTest(Test):'
1670 lout.rstrip(b'\n'))
1674 lout.rstrip(b'\n'))
1671 postout.append(b' ' + lout) # Let diff deal with it.
1675 postout.append(b' ' + lout) # Let diff deal with it.
1672 if r != '': # If line failed.
1676 if r != '': # If line failed.
1673 warnonly = 3 # for sure not
1677 warnonly = WARN_NO
1674 elif warnonly == 1: # Is "not yet" and line is warn only.
1678 elif warnonly == WARN_UNDEFINED:
1675 warnonly = 2 # Yes do warn.
1679 warnonly = WARN_YES
1676 break
1680 break
1677 else:
1681 else:
1678 # clean up any optional leftovers
1682 # clean up any optional leftovers
@@ -1704,7 +1708,7 b' class TTest(Test):'
1704 if pos in after:
1708 if pos in after:
1705 postout += after.pop(pos)
1709 postout += after.pop(pos)
1706
1710
1707 if warnonly == 2:
1711 if warnonly == WARN_YES:
1708 exitcode = False # Set exitcode to warned.
1712 exitcode = False # Set exitcode to warned.
1709
1713
1710 return exitcode, postout
1714 return exitcode, postout
General Comments 0
You need to be logged in to leave comments. Login now