[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-twister] branch master updated: Explaining Libtalert
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-twister] branch master updated: Explaining Libtalertwister. |
Date: |
Thu, 13 Sep 2018 09:34:18 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository twister.
The following commit(s) were added to refs/heads/master by this push:
new 8b54aae Explaining Libtalertwister.
8b54aae is described below
commit 8b54aae6840736c37e0bde592c0db30ac2589fa5
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Sep 13 09:33:20 2018 +0200
Explaining Libtalertwister.
Make the slide NOT depend on the Taler interpreter for tests.
---
presentation/twister.tex | 49 +++++++++++++++++++++++-------------------------
1 file changed, 23 insertions(+), 26 deletions(-)
diff --git a/presentation/twister.tex b/presentation/twister.tex
index 7b973d8..9fc0f8b 100644
--- a/presentation/twister.tex
+++ b/presentation/twister.tex
@@ -143,38 +143,35 @@
\end{textblock*}
\begin{Verbatim}[fontsize=\tiny]
- #include <taler/taler_testing_lib.h>
- #include <taler/taler_twister_testing_lib.h>
#include <taler/taler_twister_service.h>
+ #define CONFIG "twister.conf"
- const char *proxied_url;
struct GNUNET_OS_Process *twisterd;
-
- void
- run (void *cls,
- struct TALER_TESTING_Interpreter *is)
+ struct TALER_TWISTER_Handle *handle;
+ static void
+ callback (void *cls)
{
- struct TALER_TESTING_Command commands[] = {
- TALER_TESTING_cmd_flip_upload ("cmd-name",
- "test.conf",
- "child.one"),
- /* Will test the flipped field. */
- TALER_TESTING_cmd_x ("name-x",
- ..),
- TALER_TESTING_cmd_end ()
- };
+ fprintf (stderr, "Command received\n");
}
- int
- main ()
- {
- /* Checks ports are available, extract proxied URL. */
- proxied_url = TALER_TESTING_prepare_twister ("twister.conf");
- twisterd = TALER_TESTING_run_twister ("twister.conf");
-
- return TALER_TESTING_setup (&run,
- "test.conf");
- }
+ /* Start the Twister and connect to it */
+ TALER_TESTING_prepare_twister (CONFIG);
+ twisterd = TALER_TESTING_run_twister (CONFIG);
+ handle = TALER_TWISTER_connect (CONFIG);
+
+ /* Issue char-flipping command */
+ TALER_TWISTER_flip_upload (handle,
+ "child.one",
+ callback,
+ NULL);
+ /* Next HTTP POST will get its "child.one" string
+ * field randomly flipped in one random char. */
+ sleep (10);
+
+ TALER_TWISTER_disconnect (handle);
+ GNUNET_OS_kill (twisterd, SIGINT);
+ GNUNET_OS_wait (twisterd);
+ GNUNET_OS_destroy (twisterd);
\end{Verbatim}
\end{frame}
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-twister] branch master updated: Explaining Libtalertwister.,
gnunet <=