diff options
| author | 2020-03-28 23:06:30 -0400 | |
|---|---|---|
| committer | 2020-03-28 23:06:30 -0400 | |
| commit | 69e30e5fbf896e7359d2e3d207386ef0971bee49 (patch) | |
| tree | ef09ddcf4a16b1ee644e9c634020e10d2224d86a /debian/tests/run-tests.py | |
| parent | 597447855ed75143df7eaa10f70299398e1de70f (diff) | |
Run upstream's testsuite for autopkgtest.
Diffstat (limited to 'debian/tests/run-tests.py')
| -rw-r--r-- | debian/tests/run-tests.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/debian/tests/run-tests.py b/debian/tests/run-tests.py new file mode 100644 index 0000000..11feaed --- /dev/null +++ b/debian/tests/run-tests.py @@ -0,0 +1,23 @@ +#!/bin/bash +# This is a slightly modified version of upstream's scripts/run_tests.py + +TESTS_CORE=(cache config cookies downloader extractor oauth postprocessor text util) +TESTS_RESULTS=(results) + + +# select tests +case "${1:-${GALLERYDL_TESTS:-core}}" in + core) TESTS=( ${TESTS_CORE[@]} );; + results) TESTS=( ${TESTS_RESULTS[@]} );; + *) TESTS=( );; +esac + + +# transform each array element to test_###.py +TESTS=( ${TESTS[@]/#/test_} ) +TESTS=( ${TESTS[@]/%/.py} ) + + +# run 'nosetests3' with selected tests +# (or all tests if ${TESTS} is empty) +nosetests3 --verbose -w "test" ${TESTS[@]} |
