]> git.ozlabs.org Git - ccan/commitdiff
Fix make check to run all tests.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 8 Dec 2008 05:18:47 +0000 (15:48 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 8 Dec 2008 05:18:47 +0000 (15:48 +1030)
Fix str test.

Makefile
ccan/str/test/run.c

index 4e49797456302ff8bad93620071cbf132c4db601..222a9b22146c516476d9ae2ae816a00636c5ad25 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ JUNKBALLS=$(JUNKDIRS:%=$(WEBDIR)/%.tar.bz2)
 include Makefile-ccan
 
 check: $(ALL_DIRS:%=test-%)
 include Makefile-ccan
 
 check: $(ALL_DIRS:%=test-%)
+       echo $(ALL_DIRS)
 
 distclean: clean
        rm -f $(ALL_DEPENDS)
 
 distclean: clean
        rm -f $(ALL_DEPENDS)
@@ -82,6 +83,11 @@ test-ccan/%: tools/run_tests libccan.a(%.o)
        @echo Testing $*...
        @if tools/run_tests $(V) ccan/$* | grep ^'not ok'; then exit 1; else exit 0; fi
 
        @echo Testing $*...
        @if tools/run_tests $(V) ccan/$* | grep ^'not ok'; then exit 1; else exit 0; fi
 
+# Some don't have object files.
+test-ccan/%:: tools/run_tests
+       @echo Testing $*...
+       @if tools/run_tests $(V) ccan/$* | grep ^'not ok'; then exit 1; else exit 0; fi
+
 ccanlint: tools/ccanlint/ccanlint
 
 clean: tools-clean
 ccanlint: tools/ccanlint/ccanlint
 
 clean: tools-clean
index 20711ad0c0ea29fccd2ec9f20940fe935e8a4793..b55444a15b595f25250d9de4172187d9fbea675a 100644 (file)
@@ -1,7 +1,6 @@
-#include "string/string.h"
+#include "str/str.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdio.h>
-#include "string/string.c"
 #include "tap/tap.h"
 
 /* FIXME: ccanize */
 #include "tap/tap.h"
 
 /* FIXME: ccanize */
@@ -24,8 +23,6 @@ static char *strdup_rev(const char *s)
 int main(int argc, char *argv[])
 {
        unsigned int i, j, n;
 int main(int argc, char *argv[])
 {
        unsigned int i, j, n;
-       char **split, *str;
-       void *ctx;
        char *strings[NUM_SUBSTRINGS * NUM_SUBSTRINGS];
        
        n = 0;
        char *strings[NUM_SUBSTRINGS * NUM_SUBSTRINGS];
        
        n = 0;