2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-16 17:45:09 +00:00
qpdf/pkg-test/run-all

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
693 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
set -e
cd $(dirname $0)/..
CUR_TEMP=
function clean_temp() {
if [[ $CUR_TEMP =~ .*\.qpdf-test$ && -d $CUR_TEMP ]]; then
rm -rf $CUR_TEMP
fi
}
trap clean_temp EXIT
declare -a any_failed
for i in pkg-test/test-*; do
if [[ $i =~ .*~ ]]; then
continue
fi
CUR_TEMP=$(mktemp --suffix=.qpdf-test -d)
printf "\n\n\e[40m\e[1;35m*** RUNNING $i ***\e[0m\n\n\n"
if ! $i $CUR_TEMP; then
any_failed=(${any_failed[*]} $i)
fi
clean_temp
done
if [[ ${#any_failed} != 0 ]]; then
for i in ${any_failed[*]}; do
echo 1>&2 "FAILED: $i"
done
exit 2
fi
printf "\n\n\e[40m\e[1;35m*** ALL TESTS PASSED ***\e[0m\n"