summaryrefslogtreecommitdiff
path: root/src/include/taler_testing_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-03 20:57:01 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-05 16:50:16 +0200
commit49f466df401259248c5d187374655492d4b4eec7 (patch)
tree71d85be4a5ecabea8dac72670ca6b1d4c7c085aa /src/include/taler_testing_lib.h
parent2279c8ab17f641c02fd47a0fb58428ae3b96c920 (diff)
downloadexchange-49f466df401259248c5d187374655492d4b4eec7.tar.gz
exchange-49f466df401259248c5d187374655492d4b4eec7.tar.bz2
exchange-49f466df401259248c5d187374655492d4b4eec7.zip
move rewind command to exchange, add proper support for rewinding in batches, modify API to rewind to label
Diffstat (limited to 'src/include/taler_testing_lib.h')
-rw-r--r--src/include/taler_testing_lib.h38
1 files changed, 32 insertions, 6 deletions
diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h
index 7779ca2b..d4251364 100644
--- a/src/include/taler_testing_lib.h
+++ b/src/include/taler_testing_lib.h
@@ -388,10 +388,9 @@ struct TALER_TESTING_Interpreter
void *final_cleanup_cb_cls;
/**
- * Instruction pointer. Tells #interpreter_run() which
- * instruction to run next. Need (signed) int because
- * it gets -1 when rewinding the interpreter to the first
- * CMD.
+ * Instruction pointer. Tells #interpreter_run() which instruction to run
+ * next. Need (signed) int because it gets -1 when rewinding the
+ * interpreter to the first CMD.
*/
int ip;
@@ -599,7 +598,22 @@ TALER_TESTING_interpreter_fail (struct TALER_TESTING_Interpreter *is);
* @return a end-command.
*/
struct TALER_TESTING_Command
-TALER_TESTING_cmd_end ();
+TALER_TESTING_cmd_end (void);
+
+
+/**
+ * Make the instruction pointer point to @a target_label
+ * only if @a counter is greater than zero.
+ *
+ * @param label command label
+ * @param target_label label of the new instruction pointer's destination after the jump;
+ * must be before the current instruction
+ * @param counter counts how many times the rewinding is to happen.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_rewind_ip (const char *label,
+ const char *target_label,
+ unsigned int counter);
/**
@@ -816,7 +830,6 @@ TALER_TESTING_setup_with_auditor_and_exchange (TALER_TESTING_Main main_cb,
* @param config_filename configuration filename.
* @param bank_url base URL of the bank, used by `wget' to check
* that the bank was started right.
- *
* @return the process, or NULL if the process could not
* be started.
*/
@@ -839,6 +852,7 @@ TALER_TESTING_run_bank (const char *config_filename,
struct TALER_TESTING_LibeufinServices
TALER_TESTING_run_libeufin (const struct TALER_TESTING_BankConfiguration *bc);
+
/**
* Runs the Fakebank by guessing / extracting the portnumber
* from the base URL.
@@ -1896,6 +1910,18 @@ TALER_TESTING_cmd_batch_next (struct TALER_TESTING_Interpreter *is);
struct TALER_TESTING_Command *
TALER_TESTING_cmd_batch_get_current (const struct TALER_TESTING_Command *cmd);
+
+/**
+ * Set what command the batch should be at.
+ *
+ * @param cmd current batch command
+ * @param new_ip where to move the IP
+ */
+void
+TALER_TESTING_cmd_batch_set_current (const struct TALER_TESTING_Command *cmd,
+ unsigned int new_ip);
+
+
/**
* Make a serialize-keys CMD.
*