summaryrefslogtreecommitdiff
path: root/tests/openpgp/defs.inc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/openpgp/defs.inc')
-rwxr-xr-xtests/openpgp/defs.inc33
1 files changed, 30 insertions, 3 deletions
diff --git a/tests/openpgp/defs.inc b/tests/openpgp/defs.inc
index 12e1b80..5d5e03d 100755
--- a/tests/openpgp/defs.inc
+++ b/tests/openpgp/defs.inc
@@ -42,23 +42,33 @@ LC_MESSAGES=
# Internal use.
defs_stop_on_error=no
defs_error_seen=no
+defs_progress_active=no
#--------------------------------
#------ utility functions -------
#--------------------------------
+progress_cancel () {
+ if [ x$defs_progress_active = xyes ]; then
+ echo
+ defs_progress_active=no
+ fi
+}
+
fatal () {
+ progress_cancel
echo "$pgmname: fatal:" $* >&2
echo "$pgmname: fatal:" $* >&5
exit 1;
}
error () {
+ progress_cancel
echo "$pgmname:" $* >&2
defs_error_seen=yes
echo "$pgmname:" $* >&5
if [ x$defs_stop_on_error != xyes ]; then
- exit 1
+ exit 1
fi
}
@@ -77,6 +87,7 @@ resume_error () {
}
info () {
+ progress_cancel
echo "$pgmname:" $* >&2
if [ -n "${verbose+set}" ]; then
echo "$pgmname:" $* >&5
@@ -87,7 +98,6 @@ linefeed () {
echo >&2
}
-
echo_n_init=no
echo_n () {
if test "$echo_n_init" = "no"; then
@@ -110,6 +120,23 @@ echo_n () {
}
+progress_end () {
+ if [ x$defs_progress_active = xyes ]; then
+ echo "<"
+ defs_progress_active=no
+ fi
+}
+
+progress () {
+ if [ x$defs_progress_active != xyes ]; then
+ echo_n " > "
+ defs_progress_active=yes
+ fi
+ echo_n "$* "
+}
+
+
+
#cleanup () {
# rm $cleanup_files 2>/dev/null || true
# echo "#empty" >./gpg.conf
@@ -162,7 +189,7 @@ pgmname=`basename $0`
[ -z "$srcdir" ] && fatal "not called from make"
# Make sure we have a valid option file even with VPATH builds.
-for f in gpg.conf ; do
+for f in gpg.conf ; do
if [ -f ./$f ]; then
:
elif [ -f $srcdir/$f.tmpl ]; then