Show More
@@ -1302,6 +1302,10 b' bchr = chr' | |||
|
1302 | 1302 | if PYTHON3: |
|
1303 | 1303 | bchr = lambda x: bytes([x]) |
|
1304 | 1304 | |
|
1305 | WARN_UNDEFINED = 1 | |
|
1306 | WARN_YES = 2 | |
|
1307 | WARN_NO = 3 | |
|
1308 | ||
|
1305 | 1309 | class TTest(Test): |
|
1306 | 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 | 1606 | def _processoutput(self, exitcode, output, salt, after, expected): |
|
1603 | 1607 | # Merge the script output back into a unified test. |
|
1604 |
warnonly = |
|
|
1608 | warnonly = WARN_UNDEFINED # 1: not yet; 2: yes; 3: for sure not | |
|
1605 | 1609 | if exitcode != 0: |
|
1606 |
warnonly = |
|
|
1610 | warnonly = WARN_NO | |
|
1607 | 1611 | |
|
1608 | 1612 | pos = -1 |
|
1609 | 1613 | postout = [] |
@@ -1670,9 +1674,9 b' class TTest(Test):' | |||
|
1670 | 1674 | lout.rstrip(b'\n')) |
|
1671 | 1675 | postout.append(b' ' + lout) # Let diff deal with it. |
|
1672 | 1676 | if r != '': # If line failed. |
|
1673 |
warnonly = |
|
|
1674 | elif warnonly == 1: # Is "not yet" and line is warn only. | |
|
1675 |
warnonly = |
|
|
1677 | warnonly = WARN_NO | |
|
1678 | elif warnonly == WARN_UNDEFINED: | |
|
1679 | warnonly = WARN_YES | |
|
1676 | 1680 | break |
|
1677 | 1681 | else: |
|
1678 | 1682 | # clean up any optional leftovers |
@@ -1704,7 +1708,7 b' class TTest(Test):' | |||
|
1704 | 1708 | if pos in after: |
|
1705 | 1709 | postout += after.pop(pos) |
|
1706 | 1710 | |
|
1707 |
if warnonly == |
|
|
1711 | if warnonly == WARN_YES: | |
|
1708 | 1712 | exitcode = False # Set exitcode to warned. |
|
1709 | 1713 | |
|
1710 | 1714 | return exitcode, postout |
General Comments 0
You need to be logged in to leave comments.
Login now