1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#!/bin/sh
set -e -u
cp -va test "$AUTOPKGTEST_TMP"/
cd "$AUTOPKGTEST_TMP"
RET=0
# Loop over all supported Python and unrar versions
for py in $(py3versions -s); do
for unrar in unrar-nonfree unrar-free; do
echo "Running testsuite with $py and $unrar:"
# Point the symlink at /usr/bin/unrar to the unrar of our choice
sudo update-alternatives --set unrar "$(command -v $unrar)"
update-alternatives --display unrar
# Allow test runs to continue even in case of failures
set +e
if [ "$unrar" = "unrar-free" ]; then
# Deselect tests broken by unrar-free's limited format support
$py -m pytest -k "not ( \
test_open_psw_late_rar5 or \
test_open_pathlib_path or \
test_read_psw_late_rar5 or \
test_vols[test/files/rar3-old.rar] or \
test_rar3_header_encryption or \
test_reading[test/files/rar15-comment-lock.rar] or \
test_reading[test/files/rar15-comment.rar] or \
test_reading[test/files/rar202-comment-nopsw.rar] or \
test_reading[test/files/rar202-comment-psw.rar] or \
test_reading[test/files/rar3-solid.rar] or \
test_reading[test/files/rar5-psw-blake.rar] or \
test_reading[test/files/rar5-psw.rar] or \
test_reading_rar3_hpsw or \
test_reading_rar5_hpsw or \
test_unrar_tool )" \
test
else
$py -m pytest test
fi
# Record the exit status and make errors fatal again
RET=$((RET+$?))
set -e
done
done
exit $RET
|