Files @ 7e67883ee300
Branch filter:

Location: kallithea/pytest.ini

domruf
vcs: fix processing of git commands that return output on stderr

The subprocessio module used for interfacing with Git is using threading. It
might not be fully deterministic.

The subprocessio module also had the "feature" that it stopped reading and
reported failure once it found output on stderr - even if the command completed
(or would complete) with success.

Sometimes (like https://drone.io/bitbucket.org/domruf/kallithea/24 ) tests on
linux could fail on totally normal informational output like:

Couldn't run git command (['git', '-c', 'core.quotepath=false', 'checkout', 'foobranch']).
Original error was: Subprocess exited due to an error:
Switched to branch 'foobranch'

On Windows it would fail even more often.

To fix that, ignore stderr while processing output. There is a risk that it in
some cases can make the process block on stderr and thus never finish ... but
there is no reports of that yet.
1
2
3
4
5
6
7
8
9
[pytest]
# only look for tests in kallithea/tests
python_files = kallithea/tests/**/test_*.py
addopts =
    # --verbose
    # show extra test summary info as specified by chars (f)ailed, (E)error, (s)skipped, (x)failed, (X)passed, (w)warnings.
    -rfEsxXw
    # Shorter scrollbacks; less stuff to scroll through
    --tb=short