aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_loop.c')
-rw-r--r--src/testing/testing_api_loop.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c
index 0c24c0e26..ab095aafa 100644
--- a/src/testing/testing_api_loop.c
+++ b/src/testing/testing_api_loop.c
@@ -408,6 +408,22 @@ GNUNET_TESTING_cmd_end (void)
408{ 408{
409 static struct GNUNET_TESTING_Command cmd; 409 static struct GNUNET_TESTING_Command cmd;
410 cmd.label = NULL; 410 cmd.label = NULL;
411 cmd.shutdown_on_end = GNUNET_YES;
412
413 return cmd;
414}
415
416/**
417 * Create command array terminator without shutdown.
418 *
419 * @return a end-command.
420 */
421struct GNUNET_TESTING_Command
422GNUNET_TESTING_cmd_end_without_shutdown (void)
423{
424 static struct GNUNET_TESTING_Command cmd;
425 cmd.label = NULL;
426 cmd.shutdown_on_end = GNUNET_NO;
411 427
412 return cmd; 428 return cmd;
413} 429}
@@ -447,7 +463,8 @@ interpreter_run (void *cls)
447 "Running command END %p\n", 463 "Running command END %p\n",
448 is); 464 is);
449 is->result = GNUNET_OK; 465 is->result = GNUNET_OK;
450 GNUNET_SCHEDULER_shutdown (); 466 if (GNUNET_YES == cmd->shutdown_on_end)
467 GNUNET_SCHEDULER_shutdown ();
451 return; 468 return;
452 } 469 }
453 else if (NULL != cmd) 470 else if (NULL != cmd)