summaryrefslogtreecommitdiff
path: root/src/auditor
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-08-23 15:17:54 +0200
committerChristian Grothoff <christian@grothoff.org>2019-08-23 15:17:54 +0200
commit0d230131e61df2bff75ab47256217eb22c910b26 (patch)
treeea3a67e898b0b7598f5bd029af49b1d18c563d2f /src/auditor
parentb58410ce13169ca4f9e06a9a522e207128cdb6b7 (diff)
downloadexchange-0d230131e61df2bff75ab47256217eb22c910b26.tar.gz
exchange-0d230131e61df2bff75ab47256217eb22c910b26.tar.bz2
exchange-0d230131e61df2bff75ab47256217eb22c910b26.zip
check required commands exist
Diffstat (limited to 'src/auditor')
-rw-r--r--src/auditor/.gitignore8
-rwxr-xr-xsrc/auditor/test-auditor.sh11
2 files changed, 18 insertions, 1 deletions
diff --git a/src/auditor/.gitignore b/src/auditor/.gitignore
index d92c3a3fa..409175fbc 100644
--- a/src/auditor/.gitignore
+++ b/src/auditor/.gitignore
@@ -1,2 +1,10 @@
taler-auditor-httpd
+taler-auditor
+taler-wire-auditor
taler-auditor-exchange
+test-audit.json
+test-report.aux
+test-report.pdf
+test-report.tex
+test-wire-audit.json
+texput.aux
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index 48c7d0dfb..95f7691e4 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -7,11 +7,19 @@
# Requires 'jq' tool and Postgres superuser rights!
set -eu
+# test required commands exist
+echo "Testing for jq"
+jq -h > /dev/null || exit 77
+echo "Testing for taler-bank-manage"
+taler-bank-manage -h >/dev/null || exit 77
+echo "Testing for pdflatex"
+which pdflatex > /dev/null || exit 77
+
echo "Database setup"
DB=taler-auditor-test
dropdb $DB 2> /dev/null || true
createdb -T template0 $DB || exit 77
-jq -h > /dev/null || exit 77
+
# Import pre-generated database, -q(ietly) using single (-1) transaction
psql $DB -q -1 -f ../benchmark/auditor-basedb.sql > /dev/null
MASTER_PUB=`cat ../benchmark/auditor-basedb.mpub`
@@ -32,6 +40,7 @@ kill `jobs -p`
echo "TeXing"
../../contrib/render.py test-audit.json test-wire-audit.json < ../../contrib/auditor-report.tex.j2 > test-report.tex
+
pdflatex test-report.tex >/dev/null
pdflatex test-report.tex >/dev/null