aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_group.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-07-25 14:11:35 +0000
committerChristian Grothoff <christian@grothoff.org>2011-07-25 14:11:35 +0000
commit91d1bc4750c36d7f3e996f483fe4bee7c242eb45 (patch)
tree63853d31df779e4b6cc8621eded470934f958e97 /src/testing/testing_group.c
parent21e8f6112aa41b1fd7f4c49c07304044b7cbd36e (diff)
downloadgnunet-91d1bc4750c36d7f3e996f483fe4bee7c242eb45.tar.gz
gnunet-91d1bc4750c36d7f3e996f483fe4bee7c242eb45.zip
allow user to configure no deletion with testing
Diffstat (limited to 'src/testing/testing_group.c')
-rw-r--r--src/testing/testing_group.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c
index f2442aade..e7be22a8a 100644
--- a/src/testing/testing_group.c
+++ b/src/testing/testing_group.c
@@ -234,6 +234,11 @@ struct ShutdownContext
234 * Closure for cb 234 * Closure for cb
235 */ 235 */
236 void *cb_cls; 236 void *cb_cls;
237
238 /**
239 * Should we delete all of the files from the peers?
240 */
241 int delete_files;
237}; 242};
238 243
239/** 244/**
@@ -6711,7 +6716,7 @@ schedule_shutdown_task(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
6711 GNUNET_TESTING_daemon_stop (peer_shutdown_ctx->daemon, 6716 GNUNET_TESTING_daemon_stop (peer_shutdown_ctx->daemon,
6712 shutdown_ctx->timeout, 6717 shutdown_ctx->timeout,
6713 &internal_shutdown_callback, peer_shutdown_ctx, 6718 &internal_shutdown_callback, peer_shutdown_ctx,
6714 GNUNET_YES, GNUNET_NO); 6719 shutdown_ctx->delete_files, GNUNET_NO);
6715 } 6720 }
6716 else 6721 else
6717 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 6722 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS,
@@ -6745,6 +6750,9 @@ GNUNET_TESTING_daemons_stop(struct GNUNET_TESTING_PeerGroup *pg,
6745 GNUNET_assert (pg->total > 0); 6750 GNUNET_assert (pg->total > 0);
6746 6751
6747 shutdown_ctx = GNUNET_malloc (sizeof (struct ShutdownContext)); 6752 shutdown_ctx = GNUNET_malloc (sizeof (struct ShutdownContext));
6753 shutdown_ctx->delete_files = GNUNET_CONFIGURATION_get_value_yesno (pg->cfg,
6754 "TESTING",
6755 "DELETE_FILES");
6748 shutdown_ctx->cb = cb; 6756 shutdown_ctx->cb = cb;
6749 shutdown_ctx->cb_cls = cb_cls; 6757 shutdown_ctx->cb_cls = cb_cls;
6750 shutdown_ctx->total_peers = pg->total; 6758 shutdown_ctx->total_peers = pg->total;