Created
June 12, 2013 00:00
-
-
Save slor/5761887 to your computer and use it in GitHub Desktop.
Run django test on all the packages listed in a CSV file. Supports additional args too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Run tests on packages listed in a csv file. | |
# | |
# Usage: ./test_everything.sh [arg1 arg2 ...] | |
# | |
# Runs manage.py test on all the packages listed in what_to_test.csv. You can | |
# pass additional args and they will be appended to the manage command. | |
# | |
# Example: | |
# | |
# > ./test_everything.sh --with-xunit --xunit-file=$WORKSPACE/nosetests.xml -- -v | |
# | |
# Input CSV format: | |
# | |
# package1 | |
# package2 | |
# ... | |
# packageN | |
# This line is ignored. Don't add a trailing newline! | |
INPUT=what_to_test.csv | |
PACKAGES='' | |
while read package | |
do | |
PACKAGES="$PACKAGES $package" | |
done < "$INPUT" | |
echo "$PACKAGES $@" | xargs python manage.py test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment