Why is Jenkins grabbing stdout while ignoring newlines in console output?

It's the strangest thing ever, and I've been spinning my wheels on it and I can't figure it out. Ever since I let Jenkins keep the long output, it was ignoring newlines on output blocks from my Pytest stdout installation, but nowhere else! If you look at the captured stdout, newlines become literal characters, not valid newlines:

captured stdout setup

But if you look at any other section of the console output, it looks 100% more accurate:

captured stderr setup

This blows my mind as the jUnit xml looks great and if I run pytest with the -s flag on any terminal or even Jenkins it looks great too. Even if I disable saving long output, it looks perfectly fine, but it cuts the console output, which is not ideal for what I'm trying to do.

Does anyone know why this might be happening?

Thanks for reading this thread.

+3


source to share





All Articles