summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2017-12-23 12:47:31 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2017-12-23 12:47:31 +0100
commit88bef48c1e5dc04d28f4bc26a42dadb27686bec0 (patch)
treec59d6e57ad1dfdbce1336dad2e90722a4ee6625f /Makefile.am
parent64d9a879da628bbd9a78aba368641224b60ab9cf (diff)
downloadbank-88bef48c1e5dc04d28f4bc26a42dadb27686bec0.tar.gz
bank-88bef48c1e5dc04d28f4bc26a42dadb27686bec0.tar.bz2
bank-88bef48c1e5dc04d28f4bc26a42dadb27686bec0.zip
test launcher against db not found, plus being
nice with small screens.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am77
1 files changed, 64 insertions, 13 deletions
diff --git a/Makefile.am b/Makefile.am
index 6437b4a..7085a44 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -31,26 +31,77 @@ install-dev:
@$(PYTHON) ./install-dev.py
env:
- @export DJANGO_SETTINGS_MODULE="talerbank.settings" TALER_PREFIX="@prefix@" TALER_CONFIG_FILE="bank-check.conf" && bash
+ @export DJANGO_SETTINGS_MODULE="talerbank.settings" \
+ TALER_PREFIX="@prefix@" \
+ TALER_CONFIG_FILE="bank-check.conf" && bash
+FMT="\n\n%s\n%s\n"
+SEPARATOR=`printf "%s%s" \
+ "----------------------------------------------" \
+ "------------------------"`
+
check:
- @export DJANGO_SETTINGS_MODULE="talerbank.settings" TALER_PREFIX="@prefix@" TALER_CONFIG_FILE="bank-check.conf" && python3 -m django test --no-input talerbank.app.tests
- @printf -- "\n\n----------------------------------------------------------------------\nTesting against non existent config file\n\n"
- @export DJANGO_SETTINGS_MODULE="talerbank.settings" TALER_PREFIX="@prefix@" TALER_CONFIG_FILE="non-existent.conf" && python3 -m django test --no-input talerbank.app.tests ; test 3 = $$?
- @printf -- "\n\n----------------------------------------------------------------------\nTesting against bad db string\n\n"
- @export DJANGO_SETTINGS_MODULE="talerbank.settings" TALER_PREFIX="@prefix@" TALER_CONFIG_FILE="bank-check-alt-baddb.conf" && python3 -m django test --no-input talerbank.app.tests_alt.BadDatabaseStringTestCase ; test 2 = $$?
- @printf -- "\n\n----------------------------------------------------------------------\nTesting against bad amount\n\n"
- @export DJANGO_SETTINGS_MODULE="talerbank.settings" TALER_PREFIX="@prefix@" TALER_CONFIG_FILE="bank-check-alt-badamount.conf" && python3 -m django test --no-input talerbank.app.tests_alt.BadMaxDebtOptionTestCase
- @printf -- "\n\n----------------------------------------------------------------------\nTesting against no currency in config\n\n"
- @export TALER_BASE_CONFIG="/tmp" DJANGO_SETTINGS_MODULE="talerbank.settings" TALER_PREFIX="@prefix@" TALER_CONFIG_FILE="bank-check-alt-nocurrency.conf" && python3 -m django test --no-input talerbank.app.tests_alt.NoCurrencyOptionTestCase ; test 3 = $$?
+ @export DJANGO_SETTINGS_MODULE="talerbank.settings" \
+ TALER_PREFIX="@prefix@" \
+ TALER_CONFIG_FILE="bank-check.conf" \
+ && python3 -m django test --no-input talerbank.app.tests
+ @printf ${FMT} ${SEPARATOR} \
+ "Testing against non existent config file"
+ @export DJANGO_SETTINGS_MODULE="talerbank.settings" \
+ TALER_PREFIX="@prefix@" \
+ TALER_CONFIG_FILE="non-existent.conf" \
+ && python3 \
+ -m django test \
+ --no-input talerbank.app.tests ; \
+ test 3 = $$?
+ @printf ${FMT} ${SEPARATOR} \
+ "Testing against bad db string"
+ @export DJANGO_SETTINGS_MODULE="talerbank.settings" \
+ TALER_PREFIX="@prefix@" \
+ TALER_CONFIG_FILE="bank-check-alt-baddb.conf" \
+ && python3 \
+ -m django test \
+ --no-input \
+ talerbank.app.tests_alt.BadDatabaseStringTestCase ; \
+ test 2 = $$?
+ @printf ${FMT} ${SEPARATOR} \
+ "Testing against bad amount"
+ @export DJANGO_SETTINGS_MODULE="talerbank.settings" \
+ TALER_PREFIX="@prefix@" \
+ TALER_CONFIG_FILE="bank-check-alt-badamount.conf" \
+ && python3 \
+ -m django test \
+ --no-input \
+ talerbank.app.tests_alt.BadMaxDebtOptionTestCase
+ @printf ${FMT} ${SEPARATOR} \
+ "Testing against no currency in config"
+ @export TALER_BASE_CONFIG="/tmp" \
+ DJANGO_SETTINGS_MODULE="talerbank.settings" \
+ TALER_PREFIX="@prefix@" \
+ TALER_CONFIG_FILE="bank-check-alt-nocurrency.conf" \
+ && python3 \
+ -m django test \
+ --no-input \
+ talerbank.app.tests_alt.NoCurrencyOptionTestCase ; \
+ test 3 = $$?
+ @printf ${FMT} ${SEPARATOR} \
+ "Testing against db not found"
+ @export DJANGO_SETTINGS_MODULE="talerbank.settings" \
+ TALER_PREFIX="@prefix@" \
+ TALER_CONFIG_FILE="bank-check-alt-dbnotfound.conf" \
+ && python3 ./taler-bank-manage serve-uwsgi ; \
+ test 4 = $$?
# install into prefix
install-exec-hook:
- @pip3 install . --install-option="--prefix=@prefix@" @DEBIAN_PIP3_SYSTEM@
+ @pip3 install . --install-option="--prefix=@prefix@" \
+ @DEBIAN_PIP3_SYSTEM@
@# force update when sources changed
- @pip3 install . --install-option="--prefix=@prefix@" @DEBIAN_PIP3_SYSTEM@ --upgrade --no-deps
+ @pip3 install . --install-option="--prefix=@prefix@" \
+ @DEBIAN_PIP3_SYSTEM@ --upgrade --no-deps
pylint:
@pylint --load-plugins pylint_django talerbank/
app:
- @tar czf taler-bank-$(PACKAGE_VERSION)-app.tgz `cat INCLUDE.APP`
+ @tar czf taler-bank-$(PACKAGE_VERSION)-app.tgz \
+ `cat INCLUDE.APP`