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.c33
1 files changed, 28 insertions, 5 deletions
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c
index ab095aafa..bb04280a9 100644
--- a/src/testing/testing_api_loop.c
+++ b/src/testing/testing_api_loop.c
@@ -453,6 +453,7 @@ interpreter_run (void *cls)
453 struct FinishTaskClosure *ftc; 453 struct FinishTaskClosure *ftc;
454 struct GNUNET_TESTING_Interpreter *is = cls; 454 struct GNUNET_TESTING_Interpreter *is = cls;
455 struct GNUNET_TESTING_Command *cmd = &is->commands[is->ip]; 455 struct GNUNET_TESTING_Command *cmd = &is->commands[is->ip];
456 bool shutdown_on_end = cmd->shutdown_on_end;
456 457
457 is->task = NULL; 458 is->task = NULL;
458 459
@@ -460,11 +461,16 @@ interpreter_run (void *cls)
460 { 461 {
461 462
462 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 463 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
463 "Running command END %p\n", 464 "Running command END %p %u\n",
464 is); 465 is,
466 shutdown_on_end);
465 is->result = GNUNET_OK; 467 is->result = GNUNET_OK;
466 if (GNUNET_YES == cmd->shutdown_on_end) 468 if (GNUNET_YES == shutdown_on_end)
469 {
470 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
471 "Running command END with shutdown\n");
467 GNUNET_SCHEDULER_shutdown (); 472 GNUNET_SCHEDULER_shutdown ();
473 }
468 return; 474 return;
469 } 475 }
470 else if (NULL != cmd) 476 else if (NULL != cmd)
@@ -596,13 +602,30 @@ GNUNET_TESTING_run (const char *cfg_filename,
596 } 602 }
597 /* get the number of commands */ 603 /* get the number of commands */
598 for (i = 0; NULL != commands[i].label; i++) 604 for (i = 0; NULL != commands[i].label; i++)
599 ; 605 {
606 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
607 "on end %u\n",
608 commands[i].shutdown_on_end);
609 }
610 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
611 "on end %u\n",
612 commands[i].shutdown_on_end);
613 // ;
600 is->commands = GNUNET_new_array (i + 1, 614 is->commands = GNUNET_new_array (i + 1,
601 struct GNUNET_TESTING_Command); 615 struct GNUNET_TESTING_Command);
602 memcpy (is->commands, 616 memcpy (is->commands,
603 commands, 617 commands,
604 sizeof (struct GNUNET_TESTING_Command) * i); 618 sizeof (struct GNUNET_TESTING_Command) * (i + 1));
605 619
620 for (i = 0; NULL != is->commands[i].label; i++)
621 {
622 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
623 "on end %u\n",
624 is->commands[i].shutdown_on_end);
625 }
626 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
627 "on end %u\n",
628 is->commands[i].shutdown_on_end);
606 is->timeout_task = GNUNET_SCHEDULER_add_delayed 629 is->timeout_task = GNUNET_SCHEDULER_add_delayed
607 (timeout, 630 (timeout,
608 &do_timeout, 631 &do_timeout,