aboutsummaryrefslogtreecommitdiffstats
path: root/pkg-test/run-all
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-03-18 02:06:23 +0100
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2022-03-19 00:53:18 +0100
commite316e90d1f3124e1ddb7f33f77b91af178b963bd (patch)
tree810730d6012f5f865743e5bcdfadd38ea00b0466 /pkg-test/run-all
parentacdf5b2e7a9b3074125bc95bfcf7e6abdc9704b4 (diff)
downloadqpdf-e316e90d1f3124e1ddb7f33f77b91af178b963bd.tar.zst
Add installed package smoke tests in pkg-test directory
Diffstat (limited to 'pkg-test/run-all')
-rwxr-xr-xpkg-test/run-all34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkg-test/run-all b/pkg-test/run-all
new file mode 100755
index 00000000..e68044d6
--- /dev/null
+++ b/pkg-test/run-all
@@ -0,0 +1,34 @@
+#!/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"