tests: stop idiotic Travis TTY/pip progress bar spam

This commit is contained in:
David Wilson 2018-10-26 11:36:49 +01:00
parent 0dc3f8accf
commit 905ab890fb
4 changed files with 15 additions and 2 deletions

View File

@ -14,7 +14,8 @@ cache:
- /home/travis/virtualenv
install:
- pip install -r dev_requirements.txt
# |cat to disable progress bar.
- pip install -r dev_requirements.txt |cat
script:
- |

View File

@ -32,6 +32,17 @@ def subprocess__check_output(*popenargs, **kwargs):
if not hasattr(subprocess, 'check_output'):
subprocess.check_output = subprocess__check_output
# -----------------
# Force stdout FD 1 to be a pipe, so tools like pip don't spam progress bars.
sys.stdout = os.popen('stdbuf -oL cat', 'w', 1)
os.dup2(sys.stdout.fileno(), 1)
sys.stderr = sys.stdout
os.dup2(sys.stderr.fileno(), 2)
# -----------------
def _argv(s, *args):

View File

@ -27,7 +27,7 @@ mkdir "$TMPDIR"
echo travis_fold:start:job_setup
pip install -qqqU debops==0.7.2 ansible==${ANSIBLE_VERSION}
pip install -qqqU debops==0.7.2 ansible==${ANSIBLE_VERSION} |cat
debops-init "$TMPDIR/project"
cd "$TMPDIR/project"

View File

@ -5,6 +5,7 @@ Django==1.6.11 # Last version supporting 2.6.
mock==2.0.0
pytz==2018.5
paramiko==2.3.2 # Last 2.6-compat version.
cffi==1.11.2 # Random pin to try and fix pyparser==2.18 not having effect
pycparser==2.18 # Last version supporting 2.6.
pytest-catchlog==1.2.2
pytest==3.1.2