Index: /trunk/Nebulous/nebclient/autogen.sh
===================================================================
--- /trunk/Nebulous/nebclient/autogen.sh	(revision 12648)
+++ /trunk/Nebulous/nebclient/autogen.sh	(revision 12649)
@@ -87,4 +87,7 @@
 && rm -f src/*.xml
 
+cd tests/tap
+sh bootstrap.sh || echo "libtap bootstrap.sh failed"
+
 run_configure=true
 for arg in $*; do
Index: /trunk/Nebulous/nebclient/configure.ac
===================================================================
--- /trunk/Nebulous/nebclient/configure.ac	(revision 12648)
+++ /trunk/Nebulous/nebclient/configure.ac	(revision 12649)
@@ -1,5 +1,5 @@
 dnl Copyright (C) 2005  Joshua Hoblitt
 dnl
-dnl $Id: configure.ac,v 1.12 2006-12-12 00:31:39 jhoblitt Exp $
+dnl $Id: configure.ac,v 1.13 2007-03-28 23:24:00 jhoblitt Exp $
 
 AC_PREREQ(2.59)
@@ -7,4 +7,7 @@
 AC_INIT([nebclient], [0.0.3], [jhoblitt@cpan.org])
 AC_CONFIG_SRCDIR([nebulous.wsdl])
+
+dnl this enables the building of libtap
+AC_CONFIG_SUBDIRS([test/tap])
 
 AM_INIT_AUTOMAKE([1.6 foreign dist-bzip2])
Index: /trunk/Nebulous/nebclient/tests/Makefile.am
===================================================================
--- /trunk/Nebulous/nebclient/tests/Makefile.am	(revision 12648)
+++ /trunk/Nebulous/nebclient/tests/Makefile.am	(revision 12649)
@@ -1,6 +1,13 @@
+SUBDIRS = tap
+
 TESTS = tests
 
+AM_CPPFLAGS = \
+    -I$(top_srcdir)/tests/tap/src \
+    -I$(top_srcdir)/src
+
+AM_LDFLAGS = \
+    $(top_builddir)/tests/tap/src/libtap.la \
+    $(top_builddir)/src/libnebclient.la
+
 check_PROGRAMS = tests
-tests_SOURCES = tests.c
-tests_CPPFLAGS = -I$(top_srcdir)/src$
-tests_LDADD = $(top_builddir)/src/libnebclient.la
Index: /trunk/Nebulous/nebclient/tests/tests.c
===================================================================
--- /trunk/Nebulous/nebclient/tests/tests.c	(revision 12648)
+++ /trunk/Nebulous/nebclient/tests/tests.c	(revision 12649)
@@ -3,23 +3,7 @@
 #include <unistd.h>
 #include <stdbool.h>
+
 #include "nebclient.h"
-
-#define TESTS(num_tests) \
-    int test_num = 0; \
-    int test_failure = 0; \
-    printf("1..%d\n", num_tests);
-
-#define OK(test, name) \
-    test_num++; \
-    if (test) { \
-        printf("ok %d - %s\n", test_num, name); \
-    } else { \
-        test_failure++; \
-        printf("not ok %d - %s\n", test_num, name); \
-        printf("# %s\n", nebErr(server)); \
-    }
-
-#define TEST_EXIT \
-    exit(test_failure);
+#include "tap.h"
 
 int main (int argc, char **argv) {
@@ -27,5 +11,5 @@
     char            *key = "foobarbaz";
 
-    TESTS(22);
+    plan_tests(22);
 
     if (getenv("NEBULOUS_SERVER")) {
@@ -34,5 +18,5 @@
         server = nebServerAlloc(NULL);
     }
-    OK(server, "server not NULL");
+    ok(server, "server not NULL");
 
     printf("# server set to %s\n", server->endpoint);
@@ -44,7 +28,7 @@
         filename = nebCreate(server, key, 0, NULL, NULL, &URI);
 
-        OK(filename, "create object");
-        OK(URI, "URI not NULL");
-        OK(nebDelete(server, key), "delete object");
+        ok(filename, "create object");
+        ok(URI, "URI not NULL");
+        ok(nebDelete(server, key), "delete object");
 
         nebFree(URI);
@@ -58,6 +42,6 @@
         fh = nebOpenCreate(server, key, 0, NULL, NULL, &URI);
 
-        OK(fh > -1, "create new object filehandle");
-        OK(URI, "URI not NULL");
+        ok(fh > -1, "create new object filehandle");
+        ok(URI, "URI not NULL");
 
         nebFree(URI);
@@ -70,5 +54,5 @@
         fh = nebOpen(server, key, NEB_READ);
 
-        OK(fh, "open object for reading");
+        ok(fh, "open object for reading");
 
         close(fh);
@@ -80,5 +64,5 @@
         fh = nebOpen(server, key, NEB_WRITE);
 
-        OK(fh, "open object for writing");
+        ok(fh, "open object for writing");
 
         close(fh);
@@ -86,17 +70,17 @@
 
 
-    OK(nebReplicate(server, key, NULL, NULL), "replicate object");
+    ok(nebReplicate(server, key, NULL, NULL), "replicate object");
 
-    OK(nebOpen(server, key, NEB_WRITE) < 0, "write to object with multiple instances");
+    ok(nebOpen(server, key, NEB_WRITE) < 0, "write to object with multiple instances");
 
-    OK(nebCull(server, key), "cull object");
+    ok(nebCull(server, key), "cull object");
 
-    OK(nebStat(server, key), "stat object");
+    ok(nebStat(server, key), "stat object");
 
-    OK(nebLock(server, key, NEB_WRITE), "lock object write");
-    OK(nebUnlock(server, key, NEB_WRITE), "unlock object write");
+    ok(nebLock(server, key, NEB_WRITE), "lock object write");
+    ok(nebUnlock(server, key, NEB_WRITE), "unlock object write");
 
-    OK(nebLock(server, key, NEB_READ), "lock object read");
-    OK(nebUnlock(server, key, NEB_READ), "unlock object read");
+    ok(nebLock(server, key, NEB_READ), "lock object read");
+    ok(nebUnlock(server, key, NEB_READ), "unlock object read");
 
     {
@@ -105,6 +89,6 @@
         locations = nebFindInstances(server, key, NULL);
 
-        OK(locations, "locations not NULL");
-        OK(locations && locations->n == 1, "find instances");
+        ok(locations, "locations not NULL");
+        ok(locations && locations->n == 1, "find instances");
 
         nebObjectInstancesFree(locations);
@@ -116,5 +100,5 @@
         filename = nebFind(server, key);
 
-        OK(filename, "find file name");
+        ok(filename, "find file name");
 
         nebFree(filename);
@@ -122,9 +106,9 @@
 
 
-    OK(nebCopy(server, key, "copyiedfile"), "copy object");
+    ok(nebCopy(server, key, "copyiedfile"), "copy object");
 
-    OK(nebDelete(server, key), "delete object");
+    ok(nebDelete(server, key), "delete object");
 
-    OK(nebMove(server, "copyiedfile", "movedfile"), "move object");
+    ok(nebMove(server, "copyiedfile", "movedfile"), "move object");
 
     if (!nebDelete(server, "movedfile")) {
@@ -134,4 +118,4 @@
     nebServerFree(server);
 
-    TEST_EXIT;
+    return exit_status();
 }
