SQLITE_PLUGIN = libgnunet_plugin_identity_provider_sqlite.la
endif
+EXTRA_DIST = \
+ test_idp_defaults.conf \
+ test_idp.conf \
+ $(check_SCRIPTS)
+
pkgcfgdir= $(pkgdatadir)/config.d/
libexecdir= $(pkglibdir)/libexec/
$(top_builddir)/src/identity-provider/libgnunetidentityprovider.la \
$(top_builddir)/src/identity/libgnunetidentity.la \
$(GN_LIBINTL)
+
+check_SCRIPTS = \
+ test_idp_attribute.sh \
+ test_idp_issue.sh \
+ test_idp_consume.sh \
+ test_idp_revoke.sh
+
+if ENABLE_TEST_RUN
+ AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
+ TESTS = $(check_SCRIPTS)
+endif
[rest]
AUTOSTART = YES
-PREFIX = valgrind --leak-check=full --track-origins=yes --log-file=/tmp/restlog
+#PREFIX = valgrind --leak-check=full --track-origins=yes --log-file=/tmp/restlog
[transport]
PLUGINS =
[identity-provider]
AUTOSTART = YES
-PREFIX = valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --log-file=/tmp/idplog
+#PREFIX = valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --log-file=/tmp/idplog
[gns]
#PREFIX = valgrind --leak-check=full --track-origins=yes
RECORD_PUT_INTERVAL = 1 h
ZONE_PUBLISH_TIME_WINDOW = 1 h
DNS_ROOT=PD67SGHF3E0447TU9HADIVU9OM7V4QHTOG0EBU69TFRI2LG63DR0
-
-[rest]
-PREFIX = valgrind --leak-check=full --track-origins=yes --log-file=/tmp/rest
gnunet-identity -C rpego -c test_idp.conf
TEST_KEY=$(gnunet-identity -d -c test_idp.conf | grep testego | awk '{print $3}')
gnunet-idp -e testego -a email -V john@doe.gnu -c test_idp.conf
-gnunet-idp -e testego -a name -V John -c test_idp.conf
-gnunet-idp -e testego -D -c test_idp.conf
+gnunet-idp -e testego -a name -V John -c test_idp.conf > /dev/null 2>&1
+if test $? != 0
+then
+ echo "Failed."
+ exit 1
+fi
+
#curl localhost:7776/idp/attributes/testego
gnunet-arm -e -c test_idp.conf
TEST_ATTR="test"
gnunet-arm -s -c test_idp.conf
-gnunet-arm -i rest -c test_idp.conf
+#gnunet-arm -i rest -c test_idp.conf
gnunet-identity -C testego -c test_idp.conf
gnunet-identity -C rpego -c test_idp.conf
SUBJECT_KEY=$(gnunet-identity -d -c test_idp.conf | grep rpego | awk '{print $3}')
gnunet-idp -e testego -a email -V john@doe.gnu -c test_idp.conf
gnunet-idp -e testego -a name -V John -c test_idp.conf
TICKET=$(gnunet-idp -e testego -i "email,name" -r $SUBJECT_KEY -c test_idp.conf | awk '{print $1}')
-echo "Consuming ticket $TICKET"
-gnunet-idp -e rpego -C $TICKET -c test_idp.conf
-curl http://localhost:7776/idp/tickets/testego
+gnunet-idp -e rpego -C $TICKET -c test_idp.conf > /dev/null 2>&1
+
+if test $? != 0
+then
+ "Failed."
+ exit 1
+fi
+#curl http://localhost:7776/idp/tickets/testego
gnunet-arm -e -c test_idp.conf
TEST_ATTR="test"
gnunet-arm -s -c test_idp.conf
-gnunet-arm -i rest -c test_idp.conf
+#gnunet-arm -i rest -c test_idp.conf
gnunet-identity -C testego -c test_idp.conf
gnunet-identity -C rpego -c test_idp.conf
SUBJECT_KEY=$(gnunet-identity -d -c test_idp.conf | grep rpego | awk '{print $3}')
gnunet-idp -e testego -a email -V john@doe.gnu -c test_idp.conf > /dev/null 2>&1
gnunet-idp -e testego -a name -V John -c test_idp.conf > /dev/null 2>&1
#gnunet-idp -e testego -D -c test_idp.conf
-TICKET=$(gnunet-idp -e testego -i "email,name" -r $SUBJECT_KEY -c test_idp.conf | awk '{print $1}')
+gnunet-idp -e testego -i "email,name" -r $SUBJECT_KEY -c test_idp.conf > /dev/null 2>&1
+if test $? != 0
+then
+ echo "Failed."
+ exit 1
+fi
#curl http://localhost:7776/idp/attributes/testego
-echo "Ticket: $TICKET"
-#gnunet-arm -e -c test_idp.conf
+gnunet-arm -e -c test_idp.conf