diff options
Diffstat (limited to 'debian/tests/failing-tests-dbg')
-rw-r--r-- | debian/tests/failing-tests-dbg | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/debian/tests/failing-tests-dbg b/debian/tests/failing-tests-dbg new file mode 100644 index 0000000..5afe522 --- /dev/null +++ b/debian/tests/failing-tests-dbg @@ -0,0 +1,95 @@ +#!/bin/sh + +set -e + +if [ "$(whoami)" = root ]; then + if [ -n "$SUDO_USER" ] && getent passwd "$SUDO_USER" > /dev/null; then + su_user="$SUDO_USER" + else + su_user=nobody + fi + + if [ -e /etc/default/apport ]; then + # stop apport + service apport stop 2>/dev/null || true + sed -i '/^enabled=/s/=.*/=0/' /etc/default/apport 2>/dev/null + fi +fi + +tmphome=$ADTTMP/home +mkdir -p $tmphome/.local/lib/python3.5/site-packages +if [ -n "$su_user" ]; then + chmod go+rx $ADTTMP + chown $su_user:nogroup $tmphome +fi +ls -la $ADTTMP + +# no root access needed after this point + +debian_dir=$(dirname $(dirname $0)) + +export LOCPATH=$(pwd)/locales +sh $debian_dir/locale-gen + +export LANG=C + +TESTPYTHON="python3.5dm -W default -bb -E -R -m test" +TESTOPTS="-j 1 -w -uall,-network,-urlfetch,-gui" +TESTEXCLUSIONS= + +# test_code_module: http://bugs.python.org/issue25109 +TESTEXCLUSIONS="$TESTEXCLUSIONS test_code_module" + +# test_dbm: Fails from time to time ... +TESTEXCLUSIONS="$TESTEXCLUSIONS test_dbm" + +# test_ensurepip: not yet installed, http://bugs.debian.org/732703 +# ... and then test_venv fails too +TESTEXCLUSIONS="$TESTEXCLUSIONS test_ensurepip test_venv " + +# test_site: Investigate why this fails ... our package has one sitedir less +TESTEXCLUSIONS="$TESTEXCLUSIONS test_site" + +# test_zipfile: Issue 17753, requires write access to test and email.test +TESTEXCLUSIONS="$TESTEXCLUSIONS test_zipfile" + +if [ "$su_user" = nobody ]; then + log=/dev/null +else + log=testsuite-dbg.log +fi + +script=$debian_dir/script.py +echo "Running the failing tests with the debug enabled interpreter:" +progressions= +for tst in $TESTEXCLUSIONS; do + if [ -f "$script" ]; then + cmd="HOME=$tmphome python3.5 $script \"$log\" \"$TESTPYTHON $TESTOPTS $tst\"" + else + cmd="HOME=$tmphome $TESTPYTHON $TESTOPTS $tst" + fi + + echo "Running $tst ..." + if [ "$(whoami)" = root ]; then + echo "su -s /bin/sh -c $cmd $su_user" + if su -s /bin/sh -c "$cmd" $su_user; then + progressions="$progressions $tst" + else + : + fi + else + echo "$cmd" + if eval $cmd; then + progressions="$progressions $tst" + else + : + fi + fi +done + +if [ -n "$progressions" ]; then + echo "Tests run: $TESTEXCLUSIONS" + echo "Progressions:$progressions" +fi + +exit 0 |