Quirk in wafhelpers/bin_test.py

James Browning jamesb.fe80 at gmail.com
Fri Sep 25 02:38:01 UTC 2020


On Thu, Sep 24, 2020 at 7:29 PM Hal Murray via devel <devel at ntpsec.org> wrote:
>
> I have this patch is my local copy.  It's leftover from when I broke something
> and discovered that the test stuff crashed here.  Obviously, I screwed up by
> not keeping better notes and sending in a bug report.
>
> Does anybody understand this corner of python enough to be able to figure out
> what the bug is and what the correct fix is?
>
> --- a/wafhelpers/bin_test.py
> +++ b/wafhelpers/bin_test.py
> @@ -77,7 +77,7 @@ def run(cmd, reg, pythonic):
>          addLog("GREEN", prefix + "  OK")
>          return True
>      addLog("RED", prefix + "  FAILED")
> -    addLog("PINK", "Expected: " + reg)
> +    addLog("PINK", "Expected: " + str(breg))
>      if stdout:
>          addLog("PINK", "Got (stdout): " + stdout)
>      if stderr:

IIRC unless universal_newlines=True is passed to subprocess.popen it
returns bytes in the communication hook. I had it so that it compared
bytes. I believe the argument was recently added and all traces of
bytes were ripped out in 3f7f79 'bin_test: use universal_newlines
instead of futzing w/ polystr -r2 ...' on Aug 24.


More information about the devel mailing list