I am running tests in ADO pipelines. The problem is the output (stderr and stdout) from the ADO pipeline tests is out of order. My pipeline runs a script that calls tox which runs pytest which runs my tests.
Following troubleshooting I tried:
- I dont have control over the code base so I cant flush every output.
- I am not calling python directly with my tests, I am using pytest, so I cant use
-u - I already tried using
pytest -s, this does not help, logs are still out of order. - I tried tee'ing all output
2&1>to a log file and creating an artifact, but the same thing happens in ADO pipelines.
Note: none of this happens when I run my code locally, I see the order it should be in.
The following links I have already reviewed but I cant seem to find a solution with them:
- Why redirect output shows out of order: this link
- issue created for the problem I am having: this link
how can I fix the order of ADO pipeline output of my tests with the current limitations I have?