Skip to content

Commit

Permalink
BF: moved running all the scripts via coverage into a separate helper…
Browse files Browse the repository at this point in the history
… tool
  • Loading branch information
yarikoptic committed May 17, 2016
1 parent 6b2d7d1 commit 63b9759
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ script:
# Run tests
- PYTHONPATH=. nosetests -s -v --with-doctest --with-cov --cover-package . --logging-level=INFO -v .
# Actually run all the scripts, contributing to coverage
- bash -c 'failed=""; for f in [^_]*py; do python `which coverage` run -a $f || failed+=" $f"; echo "I: done $f. Exit code $?"; done; [ -z "$failed" ] || { echo "Failed: $failed"; exit 1; }'
- ./run_all.sh
# for now failure in flaking is ignored
- flake8 *py || echo "PEP8 the code"

Expand Down
22 changes: 22 additions & 0 deletions run_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
#
# Little helper to run all the scripts, under python coverage if coverage is available
#

set -eu
failed=""

if which coverage > /dev/null; then
COVERAGE="`which coverage` run -a"
else
COVERAGE=''
fi
for f in [^_]*py; do
python $COVERAGE $f || failed+=" $f"
echo "I: done $f. Exit code $?"
done;

if [ ! -z "$failed" ]; then
echo "Failed: $failed";
exit 1
fi

0 comments on commit 63b9759

Please sign in to comment.