bio testcase harness~
authorJi Lu <jilu@140774ce-b5e7-0310-ab8b-a85725594a96>
Thu, 15 Oct 2009 09:14:37 +0000 (09:14 +0000)
committerJi Lu <jilu@140774ce-b5e7-0310-ab8b-a85725594a96>
Thu, 15 Oct 2009 09:14:37 +0000 (09:14 +0000)
src/util/Makefile.am
src/util/test_bio.c [new file with mode: 0644]

index 32d1299d0ebadec81b1e8840e037b7a407047e3a..9c9802847c0e0903c5c62002511afafa1c4485d0 100644 (file)
@@ -88,6 +88,7 @@ libgnunet_plugin_test_la_LDFLAGS = \
 
 
 check_PROGRAMS = \
+ test_bio \
  test_client \
  test_common_allocation \
  test_common_endian \
@@ -132,6 +133,13 @@ check_PROGRAMS = \
 
 TESTS = $(check_PROGRAMS)
 
+
+test_bio_SOURCES = \
+ test_bio.c
+test_bio_LDADD = \
+ $(top_builddir)/src/util/libgnunetutil.la
+
+
 test_client_SOURCES = \
  test_client.c
 test_client_LDADD = \
diff --git a/src/util/test_bio.c b/src/util/test_bio.c
new file mode 100644 (file)
index 0000000..c4c8386
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+     This file is part of GNUnet.
+     (C) 2009 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
+     by the Free Software Foundation; either version 2, or (at your
+     option) any later version.
+
+     GNUnet is distributed in the hope that it will be useful, but
+     WITHOUT ANY WARRANTY; without even the implied warranty of
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+     General Public License for more details.
+
+     You should have received a copy of the GNU General Public License
+     along with GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file util/test_bio.c
+ * @brief testcase for the buffered IO module
+ * @author
+ */
+#include "platform.h"
+#include "gnunet_common.h"
+#include "gnunet_disk_lib.h"
+#include "gnunet_scheduler_lib.h"
+
+
+
+int
+main (int argc, char *argv[])
+{
+  unsigned int failureCount = 0;
+
+  GNUNET_log_setup ("test-bio", "WARNING", NULL);
+  if (failureCount != 0)
+    {
+      fprintf (stderr, "\n%u TESTS FAILED!\n", failureCount);
+      return -1;
+    }
+  return 0;
+}                               /* end of main */