[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: remove dependency on libext
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: remove dependency on libextractor from testcase; fix #4901 |
Date: |
Mon, 20 Feb 2017 13:53:19 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new f0149c543 remove dependency on libextractor from testcase; fix #4901
f0149c543 is described below
commit f0149c5430f42a8bad422e9c51754af59c7bfa2f
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Feb 20 13:54:25 2017 +0100
remove dependency on libextractor from testcase; fix #4901
---
src/util/Makefile.am | 2 +-
src/util/test_container_meta_data.c | 34 +++++++++++++++-------------------
2 files changed, 16 insertions(+), 20 deletions(-)
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 931dd9568..ac125fb66 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -407,7 +407,7 @@ test_container_dll_LDADD = \
test_container_meta_data_SOURCES = \
test_container_meta_data.c
test_container_meta_data_LDADD = \
- libgnunetutil.la -lextractor
+ libgnunetutil.la
test_container_multihashmap_SOURCES = \
test_container_multihashmap.c
diff --git a/src/util/test_container_meta_data.c
b/src/util/test_container_meta_data.c
index d84935a1e..cd23674a3 100644
--- a/src/util/test_container_meta_data.c
+++ b/src/util/test_container_meta_data.c
@@ -27,10 +27,9 @@
#include "platform.h"
#include "gnunet_util_lib.h"
-#if HAVE_EXTRACTOR_H
-
#define ABORT(m) { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); if
(m != NULL) GNUNET_CONTAINER_meta_data_destroy(m); return 1; }
+
static int
testMeta (int i)
{
@@ -106,10 +105,15 @@ testMeta (int i)
ABORT (m);
for (j = 0; j < i; j++)
{
- GNUNET_snprintf (val, sizeof (val), "%s.%d",
- "A teststring that should compress well.", j);
+ GNUNET_snprintf (val,
+ sizeof (val),
+ "%s.%d",
+ "A teststring that should compress well.",
+ j);
if (GNUNET_OK !=
- GNUNET_CONTAINER_meta_data_delete (m, EXTRACTOR_METATYPE_UNKNOWN, val,
+ GNUNET_CONTAINER_meta_data_delete (m,
+ EXTRACTOR_METATYPE_UNKNOWN,
+ val,
strlen (val) + 1))
{
ABORT (m);
@@ -121,7 +125,8 @@ testMeta (int i)
return 0;
}
-int
+
+static int
testMetaMore (int i)
{
struct GNUNET_CONTAINER_MetaData *meta;
@@ -135,7 +140,7 @@ testMetaMore (int i)
{
GNUNET_snprintf (txt, 128, "%u -- %u\n", i, q);
GNUNET_CONTAINER_meta_data_insert (meta, "<test>",
- q % EXTRACTOR_metatype_get_max (),
+ q % 42 /* EXTRACTOR_metatype_get_max ()
*/,
EXTRACTOR_METAFORMAT_UTF8, "text/plain",
txt, strlen (txt) + 1);
}
@@ -153,6 +158,7 @@ testMetaMore (int i)
return 0;
}
+
static int
testMetaLink ()
{
@@ -188,7 +194,8 @@ testMetaLink ()
return 0;
}
-int
+
+static int
check ()
{
struct GNUNET_CONTAINER_MetaData *meta;
@@ -345,16 +352,5 @@ main (int argc, char *argv[])
return 0;
}
-#else
-
-int
-main (int argc, char *argv[])
-{
- fprintf (stderr,
- "GNU libextractor not found, skipping test.\n");
- return 0;
-}
-
-#endif
/* end of test_container_meta_data.c */
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: remove dependency on libextractor from testcase; fix #4901,
gnunet <=