Tests should work with any POSIX shell
Tested with dash & bash.
This commit is contained in:
parent
129bb7233e
commit
9686ef6d8d
1 changed files with 6 additions and 4 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# stop on failure
|
# stop on failure
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
BACKEND="${1}"
|
BACKEND="${1}"
|
||||||
if [ -z "${WEBOOB_WORKDIR}" ]; then
|
if [ -z "${WEBOOB_WORKDIR}" ]; then
|
||||||
# use the old workdir by default
|
# use the old workdir by default
|
||||||
|
|
@ -28,13 +30,13 @@ set +e
|
||||||
if [ -n "${BACKEND}" ]; then
|
if [ -n "${BACKEND}" ]; then
|
||||||
nosetests -sv "${WEBOOB_DIR}/modules/${BACKEND}"
|
nosetests -sv "${WEBOOB_DIR}/modules/${BACKEND}"
|
||||||
else
|
else
|
||||||
find "${WEBOOB_DIR}/weboob" "${WEBOOB_DIR}/modules" -name test.py | xargs nosetests -sv
|
find "${WEBOOB_DIR}/weboob" "${WEBOOB_DIR}/modules" -name "test.py" | xargs nosetests -sv
|
||||||
fi
|
fi
|
||||||
STATUS=$?
|
STATUS=$?
|
||||||
|
|
||||||
# safe removal
|
# safe removal
|
||||||
rm -r "${WEBOOB_TMPDIR}"/{icons,repositories,modules}
|
rm -r "${WEBOOB_TMPDIR}/icons" "${WEBOOB_TMPDIR}/repositories" "${WEBOOB_TMPDIR}/modules"
|
||||||
rm "${WEBOOB_TMPDIR}"/{backends,sources.list}
|
rm "${WEBOOB_TMPDIR}/backends" "${WEBOOB_TMPDIR}/sources.list"
|
||||||
rmdir "${WEBOOB_TMPDIR}"
|
rmdir "${WEBOOB_TMPDIR}"
|
||||||
|
|
||||||
exit $STATUS
|
exit $STATUS
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue