From c58fdf786c85556a24bc6419b5c7e21b89b609c1 Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Tue, 9 Apr 2013 23:07:12 +0200 Subject: [PATCH] Remove stale .pyc files before tests and local run This should make running tests faster, as we do not remove all .pyc files anymore! --- tools/local_run.sh | 2 ++ tools/run_tests.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/local_run.sh b/tools/local_run.sh index a3b53329..182263b4 100755 --- a/tools/local_run.sh +++ b/tools/local_run.sh @@ -7,4 +7,6 @@ if [ -z "${PYTHON}" ]; then which python2.7 >/dev/null 2>&1 && PYTHON=$(which python2.7) fi +${PYTHON} "$(dirname $0)/stale_pyc.py" + exec "${PYTHON}" "$(dirname $0)/local_run.py" "$@" diff --git a/tools/run_tests.sh b/tools/run_tests.sh index 8af1ad8d..dbb32104 100755 --- a/tools/run_tests.sh +++ b/tools/run_tests.sh @@ -62,7 +62,7 @@ fi # path to sources WEBOOB_DIR=$(readlink -e $(dirname $0)/..) -find $WEBOOB_DIR -name "*.pyc" -delete +${PYTHON} "$(dirname $0)/stale_pyc.py" echo "file://$WEBOOB_DIR/modules" > "${WEBOOB_TMPDIR}/sources.list" export WEBOOB_WORKDIR="${WEBOOB_TMPDIR}"