From 428fb513ef4353f382a5e1b35e838af1fed59058 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 15 Jul 2012 15:04:45 +0000 Subject: [PATCH] -moving block test to resolve cyclic dependency --- src/block/Makefile.am | 12 ------------ src/fs/Makefile.am | 6 ++++++ .../test_block.c => fs/test_plugin_block_fs.c} | 12 ++++++------ 3 files changed, 12 insertions(+), 18 deletions(-) rename src/{block/test_block.c => fs/test_plugin_block_fs.c} (92%) diff --git a/src/block/Makefile.am b/src/block/Makefile.am index a949833f9..d0a5ae752 100644 --- a/src/block/Makefile.am +++ b/src/block/Makefile.am @@ -49,15 +49,3 @@ libgnunetblock_la_DEPENDENCIES = \ libgnunetblock_la_LDFLAGS = \ $(GN_LIB_LDFLAGS) \ -version-info 0:0:0 - -check_PROGRAMS = \ - test_block - -#TESTS = $(check_PROGRAMS) - -test_block_SOURCES = \ - test_block.c -test_block_LDADD = \ - $(top_builddir)/src/block/libgnunetblock.la \ - $(top_builddir)/src/util/libgnunetutil.la - diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am index 9615b67cd..43d60d6f2 100644 --- a/src/fs/Makefile.am +++ b/src/fs/Makefile.am @@ -205,6 +205,7 @@ if HAVE_BENCHMARKS endif check_PROGRAMS = \ + test_plugin_block_fs \ test_fs_directory \ test_fs_download \ test_fs_download_indexed \ @@ -228,6 +229,11 @@ check_PROGRAMS = \ test_gnunet_service_fs_p2p \ $(FS_BENCHMARKS) +test_plugin_block_fs_SOURCES = \ + test_plugin_block_fs.c +test_plugin_block_fs_LDADD = \ + $(top_builddir)/src/block/libgnunetblock.la \ + $(top_builddir)/src/util/libgnunetutil.la if HAVE_PYTHON check_SCRIPTS = \ diff --git a/src/block/test_block.c b/src/fs/test_plugin_block_fs.c similarity index 92% rename from src/block/test_block.c rename to src/fs/test_plugin_block_fs.c index 5e2b34696..a9f5ce3f0 100644 --- a/src/block/test_block.c +++ b/src/fs/test_plugin_block_fs.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet - (C) 2010 Christian Grothoff (and other contributing authors) + (C) 2010, 2012 Christian Grothoff (and other contributing authors) GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -18,16 +18,13 @@ Boston, MA 02111-1307, USA. */ /** - * @file block/test_block.c - * @brief test for block.c + * @file fs/test_plugin_block_fs.c + * @brief test for plugin_block_fs.c * @author Christian Grothoff */ #include "platform.h" #include "gnunet_block_lib.h" -#define DEBUG GNUNET_EXTRA_LOGGING - -#define VERBOSE GNUNET_NO static int test_fs (struct GNUNET_BLOCK_Context *ctx) @@ -57,6 +54,7 @@ test_fs (struct GNUNET_BLOCK_Context *ctx) return 0; } + int main (int argc, char *argv[]) { @@ -75,3 +73,5 @@ main (int argc, char *argv[]) FPRINTF (stderr, "Tests failed: %d\n", ret); return ret; } + +/* end of test_plugin_block_fs.c */ -- 2.25.1