diff options
author | Andy Doan <andy.doan@linaro.org> | 2015-07-20 17:14:11 -0500 |
---|---|---|
committer | Andy Doan <andy.doan@linaro.org> | 2015-07-20 17:14:11 -0500 |
commit | c929dacc164111f739a95b7cf2fddcff80b3b2b2 (patch) | |
tree | 4a350af75cbf81b634aeda72a82ea21c1ee015e7 /unit-test.sh | |
parent | 601bc17047b33a63c2b2875a3d3039038625ee41 (diff) |
add a unit-test script
can be used for development as well as CI:
https://ci.linaro.org/job/infrastructure-linaro-license-protection/
Change-Id: Ic83a6f04edc16b04db53782d9f7e9dde9151d130
Diffstat (limited to 'unit-test.sh')
-rwxr-xr-x | unit-test.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/unit-test.sh b/unit-test.sh new file mode 100755 index 0000000..7da1efd --- /dev/null +++ b/unit-test.sh @@ -0,0 +1,16 @@ +#!/bin/sh -e + +HERE=$(dirname $(readlink -f $0)) +cd $HERE + +SKIP_LINT="${SKIP_LINT-1}" +VENV_DIR="${VENV_DIR-$HERE/.venv}" + +if [ -z $VIRTUAL_ENV ] ; then + echo "creating venv: $VENV_DIR ..." + virtualenv $VENV_DIR + . $VENV_DIR/bin/activate + pip install -r requirements.txt +fi + +SKIP_LINT=$SKIP_LINT ./manage.py test license_protected_downloads |