From 3eae3e43d6f94449cb89998a676e6696438cc604 Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Tue, 10 Apr 2018 11:56:42 +0200 Subject: [PATCH] fix some tests --- src/identity-provider/gnunet-idp.c | 7 +++++-- src/identity-provider/test_idp_revoke.sh | 7 ++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/identity-provider/gnunet-idp.c b/src/identity-provider/gnunet-idp.c index 95e9f398d..1f1036d44 100644 --- a/src/identity-provider/gnunet-idp.c +++ b/src/identity-provider/gnunet-idp.c @@ -445,7 +445,10 @@ main(int argc, char *const argv[]) GNUNET_GETOPT_OPTION_END }; - return (GNUNET_OK == GNUNET_PROGRAM_run (argc, argv, "ct", + if (GNUNET_OK == GNUNET_PROGRAM_run (argc, argv, "ct", "ct", options, - &run, NULL)); + &run, NULL)) + return 0; + else + return 1; } diff --git a/src/identity-provider/test_idp_revoke.sh b/src/identity-provider/test_idp_revoke.sh index d5c2c3f77..6943fcf4f 100755 --- a/src/identity-provider/test_idp_revoke.sh +++ b/src/identity-provider/test_idp_revoke.sh @@ -31,17 +31,18 @@ ALICE_KEY=$(gnunet-identity -d -c test_idp.conf | grep alice | awk '{print $3}') BOB_KEY=$(gnunet-identity -d -c test_idp.conf | grep bob | awk '{print $3}') EVE_KEY=$(gnunet-identity -d -c test_idp.conf | grep eve | awk '{print $3}') -gnunet-idp -e alice -a email -V john@doe.gnu -c test_idp.conf -gnunet-idp -e alice -a name -V John -c test_idp.conf +gnunet-idp -e alice -E 1s -a email -V john@doe.gnu -c test_idp.conf +gnunet-idp -e alice -E 1s -a name -V John -c test_idp.conf TICKET_BOB=$(gnunet-idp -e alice -i "email,name" -r $BOB_KEY -c test_idp.conf | awk '{print $1}') #gnunet-idp -e bob -C $TICKET_BOB -c test_idp.conf TICKET_EVE=$(gnunet-idp -e alice -i "email" -r $EVE_KEY -c test_idp.conf | awk '{print $1}') - #echo "Consuming $TICKET" #gnunet-idp -e eve -C $TICKET_EVE -c test_idp.conf gnunet-idp -e alice -R $TICKET_EVE -c test_idp.conf +sleep 2 + gnunet-idp -e eve -C $TICKET_EVE -c test_idp.conf > /dev/null 2>&1 if test $? == 0 then -- 2.25.1