From 9686ef6d8d8b8fbc02ec9a55cb62b004fe880b84 Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Sat, 28 Jan 2012 00:02:24 +0100 Subject: [PATCH] Tests should work with any POSIX shell Tested with dash & bash. --- tools/run_tests.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/run_tests.sh b/tools/run_tests.sh index 427413be..570ea05d 100755 --- a/tools/run_tests.sh +++ b/tools/run_tests.sh @@ -1,6 +1,8 @@ -#!/bin/bash +#!/bin/sh + # stop on failure set -e + BACKEND="${1}" if [ -z "${WEBOOB_WORKDIR}" ]; then # use the old workdir by default @@ -28,13 +30,13 @@ set +e if [ -n "${BACKEND}" ]; then nosetests -sv "${WEBOOB_DIR}/modules/${BACKEND}" 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 STATUS=$? # safe removal -rm -r "${WEBOOB_TMPDIR}"/{icons,repositories,modules} -rm "${WEBOOB_TMPDIR}"/{backends,sources.list} +rm -r "${WEBOOB_TMPDIR}/icons" "${WEBOOB_TMPDIR}/repositories" "${WEBOOB_TMPDIR}/modules" +rm "${WEBOOB_TMPDIR}/backends" "${WEBOOB_TMPDIR}/sources.list" rmdir "${WEBOOB_TMPDIR}" exit $STATUS