summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2010-01-06 10:53:58 +1030
committerRusty Russell <rusty@rustcorp.com.au>2010-01-06 10:53:58 +1030
commit85a33135890965218010b79c89e4d3f4905727e3 (patch)
tree524ae22aeb519f2f2f5b8a2f1dd6577b370506ca
parent009f261242b7e1f5482e097315c82a4185a708bf (diff)
Remove old run-tests, clean up #includes to all be <ccan/...
-rw-r--r--ccan/alignof/test/run.c4
-rw-r--r--ccan/alloc/test/run-testsize.c6
-rw-r--r--ccan/alloc/test/run.c6
-rw-r--r--ccan/antithread/test/run-lock.c4
-rw-r--r--ccan/antithread/test/run-simple.c4
-rw-r--r--ccan/antithread/test/run-spawn-NULL.c4
-rw-r--r--ccan/antithread/test/run-spawn.c4
-rw-r--r--ccan/antithread/test/run-tell.c4
-rw-r--r--ccan/antithread/test/run-tell_parent.c4
-rw-r--r--ccan/array/test/run.c6
-rw-r--r--ccan/array_size/test/compile_fail.c2
-rw-r--r--ccan/array_size/test/run.c4
-rw-r--r--ccan/block_pool/test/run.c6
-rw-r--r--ccan/build_assert/test/compile_fail-expr.c2
-rw-r--r--ccan/build_assert/test/compile_fail.c2
-rw-r--r--ccan/build_assert/test/compile_ok.c2
-rw-r--r--ccan/build_assert/test/run-EXPR_BUILD_ASSERT.c4
-rw-r--r--ccan/ccan_tokenizer/test/run-simple-token.c14
-rw-r--r--ccan/ccan_tokenizer/test/run.c16
-rw-r--r--ccan/check_type/test/compile_fail-check_type.c2
-rw-r--r--ccan/check_type/test/compile_fail-check_type_unsigned.c2
-rw-r--r--ccan/check_type/test/compile_fail-check_types_match.c2
-rw-r--r--ccan/check_type/test/run.c4
-rw-r--r--ccan/ciniparser/ciniparser.c2
-rw-r--r--ccan/ciniparser/test/run.c10
-rw-r--r--ccan/crc/test/api.c4
-rw-r--r--ccan/endian/test/run.c4
-rw-r--r--ccan/grab_file/test/run-grab.c18
-rw-r--r--ccan/hash/test/api-hash_stable.c4
-rw-r--r--ccan/hash/test/run.c6
-rw-r--r--ccan/ilog/test/run.c6
-rw-r--r--ccan/isaac/test/run.c6
-rw-r--r--ccan/isaac/test/run64.c6
-rw-r--r--ccan/list/test/compile_ok-constant.c6
-rw-r--r--ccan/list/test/run.c6
-rw-r--r--ccan/md4/test/api.c4
-rw-r--r--ccan/noerr/test/run.c6
-rw-r--r--ccan/read_write_all/test/run-read_all.c6
-rw-r--r--ccan/read_write_all/test/run-write_all.c6
-rw-r--r--ccan/short_types/test/run.c4
-rw-r--r--ccan/str/test/run.c4
-rw-r--r--ccan/str_talloc/test/run.c8
-rw-r--r--ccan/stringmap/stringmap.c2
-rw-r--r--ccan/stringmap/test/run.c6
-rw-r--r--ccan/talloc/test/compile_fail-talloc_set.c2
-rw-r--r--ccan/talloc/test/run-external-alloc.c4
-rw-r--r--ccan/talloc/test/run-talloc_set.c4
-rw-r--r--ccan/talloc/test/run.c4
-rw-r--r--ccan/talloc_link/test/run.c6
-rw-r--r--ccan/typesafe_cb/test/compile_fail-cast_if_type.c2
-rw-r--r--ccan/typesafe_cb/test/compile_fail-typesafe_cb-int.c2
-rw-r--r--ccan/typesafe_cb/test/compile_fail-typesafe_cb.c2
-rw-r--r--ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c2
-rw-r--r--ccan/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c2
-rw-r--r--ccan/typesafe_cb/test/compile_ok-typesafe_cb-const.c2
-rw-r--r--ccan/typesafe_cb/test/compile_ok-typesafe_cb-volatile.c2
-rw-r--r--ccan/typesafe_cb/test/run.c4
-rw-r--r--tools/Makefile6
-rw-r--r--tools/run_tests.c249
-rw-r--r--tools/tools.h3
60 files changed, 138 insertions, 390 deletions
diff --git a/ccan/alignof/test/run.c b/ccan/alignof/test/run.c
index f76fb669..2da69032 100644
--- a/ccan/alignof/test/run.c
+++ b/ccan/alignof/test/run.c
@@ -1,7 +1,7 @@
+#include <ccan/alignof/alignof.h>
#include <stdlib.h>
#include <stddef.h>
-#include <tap/tap.h>
-#include "alignof/alignof.h"
+#include <ccan/tap/tap.h>
/* Alignment is remarkably difficult to test. The rules may be more
* complex than ALIGNOF() can know: eg. on i386 __alignof__(double) == 8, but
diff --git a/ccan/alloc/test/run-testsize.c b/ccan/alloc/test/run-testsize.c
index 9071cb6d..2f0b772a 100644
--- a/ccan/alloc/test/run-testsize.c
+++ b/ccan/alloc/test/run-testsize.c
@@ -1,6 +1,6 @@
-#include "alloc/alloc.h"
-#include "tap/tap.h"
-#include "alloc/alloc.c"
+#include <ccan/alloc/alloc.h>
+#include <ccan/tap/tap.h>
+#include <ccan/alloc/alloc.c>
#include <stdlib.h>
#include <stdbool.h>
#include <err.h>
diff --git a/ccan/alloc/test/run.c b/ccan/alloc/test/run.c
index 8247122e..801db576 100644
--- a/ccan/alloc/test/run.c
+++ b/ccan/alloc/test/run.c
@@ -1,6 +1,6 @@
-#include "alloc/alloc.h"
-#include "tap/tap.h"
-#include "alloc/alloc.c"
+#include <ccan/alloc/alloc.h>
+#include <ccan/tap/tap.h>
+#include <ccan/alloc/alloc.c>
#include <stdlib.h>
#include <err.h>
diff --git a/ccan/antithread/test/run-lock.c b/ccan/antithread/test/run-lock.c
index b486e0a2..712d3e1d 100644
--- a/ccan/antithread/test/run-lock.c
+++ b/ccan/antithread/test/run-lock.c
@@ -1,7 +1,7 @@
-#include "antithread/antithread.c"
+#include <ccan/antithread/antithread.c>
#include <assert.h>
#include <unistd.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
#define NUM_RUNS 100
diff --git a/ccan/antithread/test/run-simple.c b/ccan/antithread/test/run-simple.c
index 947dbe02..56569bb2 100644
--- a/ccan/antithread/test/run-simple.c
+++ b/ccan/antithread/test/run-simple.c
@@ -1,6 +1,6 @@
-#include "antithread/antithread.c"
+#include <ccan/antithread/antithread.c>
#include <assert.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
static void *test(struct at_pool *atp, int *pid)
{
diff --git a/ccan/antithread/test/run-spawn-NULL.c b/ccan/antithread/test/run-spawn-NULL.c
index 7b1b5a2c..5b633546 100644
--- a/ccan/antithread/test/run-spawn-NULL.c
+++ b/ccan/antithread/test/run-spawn-NULL.c
@@ -1,6 +1,6 @@
-#include "antithread/antithread.c"
+#include <ccan/antithread/antithread.c>
#include <assert.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
int main(int argc, char *argv[])
{
diff --git a/ccan/antithread/test/run-spawn.c b/ccan/antithread/test/run-spawn.c
index 1f12ebeb..b8aa81e5 100644
--- a/ccan/antithread/test/run-spawn.c
+++ b/ccan/antithread/test/run-spawn.c
@@ -1,6 +1,6 @@
-#include "antithread/antithread.c"
+#include <ccan/antithread/antithread.c>
#include <assert.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
int main(int argc, char *argv[])
{
diff --git a/ccan/antithread/test/run-tell.c b/ccan/antithread/test/run-tell.c
index fc42095c..84ca4928 100644
--- a/ccan/antithread/test/run-tell.c
+++ b/ccan/antithread/test/run-tell.c
@@ -1,6 +1,6 @@
-#include "antithread/antithread.c"
+#include <ccan/antithread/antithread.c>
#include <assert.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
static void *test(struct at_pool *atp, void *unused)
{
diff --git a/ccan/antithread/test/run-tell_parent.c b/ccan/antithread/test/run-tell_parent.c
index f3c17e9a..d215a670 100644
--- a/ccan/antithread/test/run-tell_parent.c
+++ b/ccan/antithread/test/run-tell_parent.c
@@ -1,6 +1,6 @@
-#include "antithread/antithread.c"
+#include <ccan/antithread/antithread.c>
#include <assert.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
static void *test(struct at_pool *atp, int *pid)
{
diff --git a/ccan/array/test/run.c b/ccan/array/test/run.c
index b0b672ba..91096727 100644
--- a/ccan/array/test/run.c
+++ b/ccan/array/test/run.c
@@ -1,7 +1,7 @@
#include <stdio.h>
-#include <tap/tap.h>
-#include "array/array.h"
-#include "array/array.c"
+#include <ccan/tap/tap.h>
+#include <ccan/array/array.h>
+#include <ccan/array/array.c>
#define countof(array...) (sizeof(array)/sizeof(*(array)))
#include "lotsOfNumbers.h"
diff --git a/ccan/array_size/test/compile_fail.c b/ccan/array_size/test/compile_fail.c
index 9f9ac650..37d315f2 100644
--- a/ccan/array_size/test/compile_fail.c
+++ b/ccan/array_size/test/compile_fail.c
@@ -1,4 +1,4 @@
-#include "array_size/array_size.h"
+#include <ccan/array_size/array_size.h>
int main(int argc, char *argv[8])
{
diff --git a/ccan/array_size/test/run.c b/ccan/array_size/test/run.c
index 3a3cdcc0..37b4200b 100644
--- a/ccan/array_size/test/run.c
+++ b/ccan/array_size/test/run.c
@@ -1,5 +1,5 @@
-#include "array_size/array_size.h"
-#include "tap/tap.h"
+#include <ccan/array_size/array_size.h>
+#include <ccan/tap/tap.h>
static char array1[1];
static int array2[2];
diff --git a/ccan/block_pool/test/run.c b/ccan/block_pool/test/run.c
index 3fa7effd..f70a8026 100644
--- a/ccan/block_pool/test/run.c
+++ b/ccan/block_pool/test/run.c
@@ -1,6 +1,6 @@
-#include "block_pool/block_pool.h"
-#include "block_pool/block_pool.c"
-#include "tap/tap.h"
+#include <ccan/block_pool/block_pool.h>
+#include <ccan/block_pool/block_pool.c>
+#include <ccan/tap/tap.h>
struct alloc_record {
size_t size;
diff --git a/ccan/build_assert/test/compile_fail-expr.c b/ccan/build_assert/test/compile_fail-expr.c
index 41cdc0f8..fa60d689 100644
--- a/ccan/build_assert/test/compile_fail-expr.c
+++ b/ccan/build_assert/test/compile_fail-expr.c
@@ -1,4 +1,4 @@
-#include "build_assert/build_assert.h"
+#include <ccan/build_assert/build_assert.h>
int main(int argc, char *argv[])
{
diff --git a/ccan/build_assert/test/compile_fail.c b/ccan/build_assert/test/compile_fail.c
index a6867db5..37d95edd 100644
--- a/ccan/build_assert/test/compile_fail.c
+++ b/ccan/build_assert/test/compile_fail.c
@@ -1,4 +1,4 @@
-#include "build_assert/build_assert.h"
+#include <ccan/build_assert/build_assert.h>
int main(int argc, char *argv[])
{
diff --git a/ccan/build_assert/test/compile_ok.c b/ccan/build_assert/test/compile_ok.c
index bc5541f5..4105484d 100644
--- a/ccan/build_assert/test/compile_ok.c
+++ b/ccan/build_assert/test/compile_ok.c
@@ -1,4 +1,4 @@
-#include "build_assert/build_assert.h"
+#include <ccan/build_assert/build_assert.h>
int main(int argc, char *argv[])
{
diff --git a/ccan/build_assert/test/run-EXPR_BUILD_ASSERT.c b/ccan/build_assert/test/run-EXPR_BUILD_ASSERT.c
index 7fd0c49f..91bbbbbf 100644
--- a/ccan/build_assert/test/run-EXPR_BUILD_ASSERT.c
+++ b/ccan/build_assert/test/run-EXPR_BUILD_ASSERT.c
@@ -1,5 +1,5 @@
-#include "build_assert/build_assert.h"
-#include "tap/tap.h"
+#include <ccan/build_assert/build_assert.h>
+#include <ccan/tap/tap.h>
int main(int argc, char *argv[])
{
diff --git a/ccan/ccan_tokenizer/test/run-simple-token.c b/ccan/ccan_tokenizer/test/run-simple-token.c
index 071848f9..efc39430 100644
--- a/ccan/ccan_tokenizer/test/run-simple-token.c
+++ b/ccan/ccan_tokenizer/test/run-simple-token.c
@@ -1,10 +1,10 @@
-#include "ccan_tokenizer/read_cnumber.c"
-#include "ccan_tokenizer/read_cstring.c"
-#include "ccan_tokenizer/dict.c"
-#include "ccan_tokenizer/ccan_tokenizer.c"
-#include "ccan_tokenizer/queue.c"
-#include "ccan_tokenizer/charflag.c"
-#include "tap/tap.h"
+#include <ccan/ccan_tokenizer/read_cnumber.c>
+#include <ccan/ccan_tokenizer/read_cstring.c>
+#include <ccan/ccan_tokenizer/dict.c>
+#include <ccan/ccan_tokenizer/ccan_tokenizer.c>
+#include <ccan/ccan_tokenizer/queue.c>
+#include <ccan/ccan_tokenizer/charflag.c>
+#include <ccan/tap/tap.h>
#define item(num) (toks->first[num])
//sed 's/toks->array\.item\[\([^]]*\)\]/item(\1)/g'
diff --git a/ccan/ccan_tokenizer/test/run.c b/ccan/ccan_tokenizer/test/run.c
index 9a4ae19b..631518aa 100644
--- a/ccan/ccan_tokenizer/test/run.c
+++ b/ccan/ccan_tokenizer/test/run.c
@@ -25,16 +25,16 @@
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "ccan_tokenizer/read_cnumber.c"
-#include "ccan_tokenizer/read_cstring.c"
-#include "ccan_tokenizer/dict.c"
-#include "ccan_tokenizer/ccan_tokenizer.c"
-#include "ccan_tokenizer/queue.c"
-#include "ccan_tokenizer/charflag.c"
+#include <ccan/ccan_tokenizer/read_cnumber.c>
+#include <ccan/ccan_tokenizer/read_cstring.c>
+#include <ccan/ccan_tokenizer/dict.c>
+#include <ccan/ccan_tokenizer/ccan_tokenizer.c>
+#include <ccan/ccan_tokenizer/queue.c>
+#include <ccan/ccan_tokenizer/charflag.c>
-#include "ccan_tokenizer/ccan_tokenizer.h"
+#include <ccan/ccan_tokenizer/ccan_tokenizer.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
#include <math.h>
diff --git a/ccan/check_type/test/compile_fail-check_type.c b/ccan/check_type/test/compile_fail-check_type.c
index d19fe86f..fe7d6a23 100644
--- a/ccan/check_type/test/compile_fail-check_type.c
+++ b/ccan/check_type/test/compile_fail-check_type.c
@@ -1,4 +1,4 @@
-#include "check_type/check_type.h"
+#include <ccan/check_type/check_type.h>
int main(int argc, char *argv[])
{
diff --git a/ccan/check_type/test/compile_fail-check_type_unsigned.c b/ccan/check_type/test/compile_fail-check_type_unsigned.c
index 6b18acb5..574d4aeb 100644
--- a/ccan/check_type/test/compile_fail-check_type_unsigned.c
+++ b/ccan/check_type/test/compile_fail-check_type_unsigned.c
@@ -1,4 +1,4 @@
-#include "check_type/check_type.h"
+#include <ccan/check_type/check_type.h>
int main(int argc, char *argv[])
{
diff --git a/ccan/check_type/test/compile_fail-check_types_match.c b/ccan/check_type/test/compile_fail-check_types_match.c
index bc1f9c31..cbd6e9bc 100644
--- a/ccan/check_type/test/compile_fail-check_types_match.c
+++ b/ccan/check_type/test/compile_fail-check_types_match.c
@@ -1,4 +1,4 @@
-#include "check_type/check_type.h"
+#include <ccan/check_type/check_type.h>
int main(int argc, char *argv[])
{
diff --git a/ccan/check_type/test/run.c b/ccan/check_type/test/run.c
index f4b33c16..83b903c0 100644
--- a/ccan/check_type/test/run.c
+++ b/ccan/check_type/test/run.c
@@ -1,5 +1,5 @@
-#include "check_type/check_type.h"
-#include "tap/tap.h"
+#include <ccan/check_type/check_type.h>
+#include <ccan/tap/tap.h>
int main(int argc, char *argv[])
{
diff --git a/ccan/ciniparser/ciniparser.c b/ccan/ciniparser/ciniparser.c
index dceb22f5..d801b736 100644
--- a/ccan/ciniparser/ciniparser.c
+++ b/ccan/ciniparser/ciniparser.c
@@ -33,7 +33,7 @@
*/
#include <ctype.h>
-#include "ciniparser.h"
+#include <ccan/ccan/ciniparser.h>
#define ASCIILINESZ (1024)
#define INI_INVALID_KEY ((char*) NULL)
diff --git a/ccan/ciniparser/test/run.c b/ccan/ciniparser/test/run.c
index 34ad13f4..5fe67b46 100644
--- a/ccan/ciniparser/test/run.c
+++ b/ccan/ciniparser/test/run.c
@@ -1,14 +1,14 @@
-#include <ciniparser/ciniparser.h>
-#include <ciniparser/ciniparser.c>
-#include <ciniparser/dictionary.h>
-#include <ciniparser/dictionary.c>
+#include <ccan/ciniparser/ciniparser.h>
+#include <ccan/ciniparser/ciniparser.c>
+#include <ccan/ciniparser/dictionary.h>
+#include <ccan/ciniparser/dictionary.c>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdbool.h>
-#include <tap/tap.h>
+#include <ccan/tap/tap.h>
#define NUM_TESTS 12
diff --git a/ccan/crc/test/api.c b/ccan/crc/test/api.c
index 5e85e35b..1d56e3d2 100644
--- a/ccan/crc/test/api.c
+++ b/ccan/crc/test/api.c
@@ -1,5 +1,5 @@
-#include "crc/crc.h"
-#include "tap/tap.h"
+#include <ccan/crc/crc.h>
+#include <ccan/tap/tap.h>
#include <string.h>
static const uint32_t crc32c_tab[] = {
diff --git a/ccan/endian/test/run.c b/ccan/endian/test/run.c
index 2cd25861..cba96f0b 100644
--- a/ccan/endian/test/run.c
+++ b/ccan/endian/test/run.c
@@ -1,7 +1,7 @@
-#include "endian/endian.h"
+#include <ccan/endian/endian.h>
#include <stdlib.h>
#include <stddef.h>
-#include <tap/tap.h>
+#include <ccan/tap/tap.h>
int main(int argc, char *argv[])
{
diff --git a/ccan/grab_file/test/run-grab.c b/ccan/grab_file/test/run-grab.c
index 3c44ce05..b3c18e5a 100644
--- a/ccan/grab_file/test/run-grab.c
+++ b/ccan/grab_file/test/run-grab.c
@@ -1,14 +1,14 @@
/* This is test for grab_file() function
*/
-#include "grab_file/grab_file.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include <err.h>
-#include <sys/stat.h>
-#include "grab_file/grab_file.c"
-#include "tap/tap.h"
-#include "str_talloc/str_talloc.h"
-#include "str/str.h"
+#include <ccan/grab_file/grab_file.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <err.h>
+#include <sys/stat.h>
+#include <ccan/grab_file/grab_file.c>
+#include <ccan/tap/tap.h>
+#include <ccan/str_talloc/str_talloc.h>
+#include <ccan/str/str.h>
int
main(int argc, char *argv[])
diff --git a/ccan/hash/test/api-hash_stable.c b/ccan/hash/test/api-hash_stable.c
index 37cd0736..d07c4a93 100644
--- a/ccan/hash/test/api-hash_stable.c
+++ b/ccan/hash/test/api-hash_stable.c
@@ -1,5 +1,5 @@
-#include "hash/hash.h"
-#include "tap/tap.h"
+#include <ccan/hash/hash.h>
+#include <ccan/tap/tap.h>
#include <stdbool.h>
#include <string.h>
diff --git a/ccan/hash/test/run.c b/ccan/hash/test/run.c
index 1857739a..2aeec42d 100644
--- a/ccan/hash/test/run.c
+++ b/ccan/hash/test/run.c
@@ -1,6 +1,6 @@
-#include "hash/hash.h"
-#include "tap/tap.h"
-#include "hash/hash.c"
+#include <ccan/hash/hash.h>
+#include <ccan/tap/tap.h>
+#include <ccan/hash/hash.c>
#include <stdbool.h>
#include <string.h>
diff --git a/ccan/ilog/test/run.c b/ccan/ilog/test/run.c
index 2aeee1ce..ce19293a 100644
--- a/ccan/ilog/test/run.c
+++ b/ccan/ilog/test/run.c
@@ -1,7 +1,7 @@
-#include "ilog/ilog.h"
-#include "ilog/ilog.c"
+#include <ccan/ilog/ilog.h>
+#include <ccan/ilog/ilog.c>
#include <stdio.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
/*Dead simple (but slow) versions to compare against.*/
diff --git a/ccan/isaac/test/run.c b/ccan/isaac/test/run.c
index 8e953bbf..81a46bc2 100644
--- a/ccan/isaac/test/run.c
+++ b/ccan/isaac/test/run.c
@@ -1,6 +1,6 @@
-#include "isaac/isaac.h"
-#include "isaac/isaac.c"
-#include "tap/tap.h"
+#include <ccan/isaac/isaac.h>
+#include <ccan/isaac/isaac.c>
+#include <ccan/tap/tap.h>
#include <stddef.h>
static const uint32_t STATEVEC[ISAAC_SZ<<1]={
diff --git a/ccan/isaac/test/run64.c b/ccan/isaac/test/run64.c
index cac186e1..db2b4d35 100644
--- a/ccan/isaac/test/run64.c
+++ b/ccan/isaac/test/run64.c
@@ -1,6 +1,6 @@
-#include "isaac/isaac64.h"
-#include "isaac/isaac64.c"
-#include "tap/tap.h"
+#include <ccan/isaac/isaac64.h>
+#include <ccan/isaac/isaac64.c>
+#include <ccan/tap/tap.h>
#include <stddef.h>
static const uint64_t STATEVEC64[ISAAC64_SZ<<1]={
diff --git a/ccan/list/test/compile_ok-constant.c b/ccan/list/test/compile_ok-constant.c
index edb3cb01..c57cdadc 100644
--- a/ccan/list/test/compile_ok-constant.c
+++ b/ccan/list/test/compile_ok-constant.c
@@ -1,6 +1,6 @@
-#include "list/list.h"
-#include "tap/tap.h"
-#include "list/list.c"
+#include <ccan/list/list.h>
+#include <ccan/tap/tap.h>
+#include <ccan/list/list.c>
#include <stdbool.h>
#include <stdio.h>
diff --git a/ccan/list/test/run.c b/ccan/list/test/run.c
index ac318e1a..1a5f0934 100644
--- a/ccan/list/test/run.c
+++ b/ccan/list/test/run.c
@@ -1,6 +1,6 @@
-#include "list/list.h"
-#include "tap/tap.h"
-#include "list/list.c"
+#include <ccan/list/list.h>
+#include <ccan/tap/tap.h>
+#include <ccan/list/list.c>
struct parent {
const char *name;
diff --git a/ccan/md4/test/api.c b/ccan/md4/test/api.c
index 339409c0..a21833c9 100644
--- a/ccan/md4/test/api.c
+++ b/ccan/md4/test/api.c
@@ -1,5 +1,5 @@
-#include "md4/md4.h"
-#include <tap/tap.h>
+#include <ccan/md4/md4.h>
+#include <ccan/tap/tap.h>
#include <stdio.h>
#include <string.h>
diff --git a/ccan/noerr/test/run.c b/ccan/noerr/test/run.c
index 6f1361ce..144e4dd0 100644
--- a/ccan/noerr/test/run.c
+++ b/ccan/noerr/test/run.c
@@ -1,6 +1,6 @@
-#include "noerr/noerr.h"
-#include "tap/tap.h"
-#include "noerr/noerr.c"
+#include <ccan/noerr/noerr.h>
+#include <ccan/tap/tap.h>
+#include <ccan/noerr/noerr.c>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
diff --git a/ccan/read_write_all/test/run-read_all.c b/ccan/read_write_all/test/run-read_all.c
index 5fa0ec39..ee6a9800 100644
--- a/ccan/read_write_all/test/run-read_all.c
+++ b/ccan/read_write_all/test/run-read_all.c
@@ -1,8 +1,8 @@
/* FIXME: Do something tricky to ensure we really do loop in read_all. */
-#include "read_write_all/read_write_all.h"
-#include "read_write_all/read_write_all.c"
-#include "tap/tap.h"
+#include <ccan/read_write_all/read_write_all.h>
+#include <ccan/read_write_all/read_write_all.c>
+#include <ccan/tap/tap.h>
#include <unistd.h>
#include <sys/types.h>
#include <signal.h>
diff --git a/ccan/read_write_all/test/run-write_all.c b/ccan/read_write_all/test/run-write_all.c
index ab21cd31..50bd729c 100644
--- a/ccan/read_write_all/test/run-write_all.c
+++ b/ccan/read_write_all/test/run-write_all.c
@@ -1,8 +1,8 @@
/* FIXME: Do something tricky to ensure we really do loop in write_all. */
-#include "read_write_all/read_write_all.h"
-#include "read_write_all/read_write_all.c"
-#include "tap/tap.h"
+#include <ccan/read_write_all/read_write_all.h>
+#include <ccan/read_write_all/read_write_all.c>
+#include <ccan/tap/tap.h>
#include <unistd.h>
#include <sys/types.h>
#include <signal.h>
diff --git a/ccan/short_types/test/run.c b/ccan/short_types/test/run.c
index a78d56ce..5aa80d7f 100644
--- a/ccan/short_types/test/run.c
+++ b/ccan/short_types/test/run.c
@@ -1,5 +1,5 @@
-#include "short_types/short_types.h"
-#include "tap/tap.h"
+#include <ccan/short_types/short_types.h>
+#include <ccan/tap/tap.h>
#include <stdlib.h>
#include <err.h>
diff --git a/ccan/str/test/run.c b/ccan/str/test/run.c
index b55444a1..f35d75d6 100644
--- a/ccan/str/test/run.c
+++ b/ccan/str/test/run.c
@@ -1,7 +1,7 @@
-#include "str/str.h"
+#include <ccan/str/str.h>
#include <stdlib.h>
#include <stdio.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
/* FIXME: ccanize */
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
diff --git a/ccan/str_talloc/test/run.c b/ccan/str_talloc/test/run.c
index 2e45aafe..4e1c3d16 100644
--- a/ccan/str_talloc/test/run.c
+++ b/ccan/str_talloc/test/run.c
@@ -1,9 +1,9 @@
-#include "str_talloc/str_talloc.h"
+#include <ccan/str_talloc/str_talloc.h>
#include <stdlib.h>
#include <stdio.h>
-#include "str_talloc/str_talloc.c"
-#include "tap/tap.h"
-#include "str/str.h"
+#include <ccan/str_talloc/str_talloc.c>
+#include <ccan/tap/tap.h>
+#include <ccan/str/str.h>
/* FIXME: ccanize */
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
diff --git a/ccan/stringmap/stringmap.c b/ccan/stringmap/stringmap.c
index b3ca57af..364e2a48 100644
--- a/ccan/stringmap/stringmap.c
+++ b/ccan/stringmap/stringmap.c
@@ -29,7 +29,7 @@
/* This is a heavily modified version of the Patricia tree implementation
in PCC at http://pcc.zentus.com/cgi-bin/cvsweb.cgi/cc/cpp/cpp.c?rev=1.96 */
-#include "stringmap.h"
+#include <ccan/stringmap/stringmap.h>
//#define CONSISTENCY_CHECK
diff --git a/ccan/stringmap/test/run.c b/ccan/stringmap/test/run.c
index 0d4db567..2ffcb124 100644
--- a/ccan/stringmap/test/run.c
+++ b/ccan/stringmap/test/run.c
@@ -1,7 +1,7 @@
-#include "stringmap/stringmap.h"
-#include "stringmap/stringmap.c"
+#include <ccan/stringmap/stringmap.h>
+#include <ccan/stringmap/stringmap.c>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
static void test_trivial(void) {
stringmap(int) map = stringmap_new(NULL);
diff --git a/ccan/talloc/test/compile_fail-talloc_set.c b/ccan/talloc/test/compile_fail-talloc_set.c
index 909076b7..cc9a1755 100644
--- a/ccan/talloc/test/compile_fail-talloc_set.c
+++ b/ccan/talloc/test/compile_fail-talloc_set.c
@@ -1,4 +1,4 @@
-#include "talloc/talloc.c"
+#include <ccan/talloc/talloc.c>
int main(void)
{
diff --git a/ccan/talloc/test/run-external-alloc.c b/ccan/talloc/test/run-external-alloc.c
index 70f3dacd..013041fe 100644
--- a/ccan/talloc/test/run-external-alloc.c
+++ b/ccan/talloc/test/run-external-alloc.c
@@ -1,5 +1,5 @@
-#include "talloc/talloc.c"
-#include "tap/tap.h"
+#include <ccan/talloc/talloc.c>
+#include <ccan/tap/tap.h>
#include <assert.h>
/* Much testing already done in run.c */
diff --git a/ccan/talloc/test/run-talloc_set.c b/ccan/talloc/test/run-talloc_set.c
index d7b49614..18b9066f 100644
--- a/ccan/talloc/test/run-talloc_set.c
+++ b/ccan/talloc/test/run-talloc_set.c
@@ -1,5 +1,5 @@
-#include "talloc/talloc.c"
-#include "tap/tap.h"
+#include <ccan/talloc/talloc.c>
+#include <ccan/tap/tap.h>
#include <assert.h>
int main(void)
diff --git a/ccan/talloc/test/run.c b/ccan/talloc/test/run.c
index ad70a51e..9654f625 100644
--- a/ccan/talloc/test/run.c
+++ b/ccan/talloc/test/run.c
@@ -25,9 +25,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "talloc/talloc.c"
+#include <ccan/talloc/talloc.c>
#include <stdbool.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
#define torture_assert(test, expr, str) \
ok(expr, "%s [\n%s: Expression %s failed: %s\n]\n", \
diff --git a/ccan/talloc_link/test/run.c b/ccan/talloc_link/test/run.c
index e095bd9e..3cbb5f01 100644
--- a/ccan/talloc_link/test/run.c
+++ b/ccan/talloc_link/test/run.c
@@ -1,6 +1,6 @@
-#include "talloc_link/talloc_link.h"
-#include "tap/tap.h"
-#include "talloc_link/talloc_link.c"
+#include <ccan/talloc_link/talloc_link.h>
+#include <ccan/tap/tap.h>
+#include <ccan/talloc_link/talloc_link.c>
#include <stdlib.h>
#include <err.h>
diff --git a/ccan/typesafe_cb/test/compile_fail-cast_if_type.c b/ccan/typesafe_cb/test/compile_fail-cast_if_type.c
index 1e417cba..db2f1249 100644
--- a/ccan/typesafe_cb/test/compile_fail-cast_if_type.c
+++ b/ccan/typesafe_cb/test/compile_fail-cast_if_type.c
@@ -1,4 +1,4 @@
-#include "typesafe_cb/typesafe_cb.h"
+#include <ccan/typesafe_cb/typesafe_cb.h>
void _set_some_value(void *val);
diff --git a/ccan/typesafe_cb/test/compile_fail-typesafe_cb-int.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb-int.c
index 54d0e7ba..c4033364 100644
--- a/ccan/typesafe_cb/test/compile_fail-typesafe_cb-int.c
+++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb-int.c
@@ -1,4 +1,4 @@
-#include "typesafe_cb/typesafe_cb.h"
+#include <ccan/typesafe_cb/typesafe_cb.h>
#include <stdlib.h>
void _callback(void (*fn)(void *arg), void *arg);
diff --git a/ccan/typesafe_cb/test/compile_fail-typesafe_cb.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb.c
index d305d5fb..bd201313 100644
--- a/ccan/typesafe_cb/test/compile_fail-typesafe_cb.c
+++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb.c
@@ -1,4 +1,4 @@
-#include "typesafe_cb/typesafe_cb.h"
+#include <ccan/typesafe_cb/typesafe_cb.h>
#include <stdlib.h>
static void _register_callback(void (*cb)(void *arg), void *arg)
diff --git a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c
index 099eb257..885a3c55 100644
--- a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c
+++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c
@@ -1,4 +1,4 @@
-#include "typesafe_cb/typesafe_cb.h"
+#include <ccan/typesafe_cb/typesafe_cb.h>
#include <stdlib.h>
static void _register_callback(void (*cb)(void *arg, int x), void *arg)
diff --git a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c
index 38daec51..c7dc6f1e 100644
--- a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c
+++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c
@@ -1,4 +1,4 @@
-#include "typesafe_cb/typesafe_cb.h"
+#include <ccan/typesafe_cb/typesafe_cb.h>
#include <stdlib.h>
static void _register_callback(void (*cb)(int x, void *arg), void *arg)
diff --git a/ccan/typesafe_cb/test/compile_ok-typesafe_cb-const.c b/ccan/typesafe_cb/test/compile_ok-typesafe_cb-const.c
index fe3a3417..f8d0ae0f 100644
--- a/ccan/typesafe_cb/test/compile_ok-typesafe_cb-const.c
+++ b/ccan/typesafe_cb/test/compile_ok-typesafe_cb-const.c
@@ -1,4 +1,4 @@
-#include "typesafe_cb/typesafe_cb.h"
+#include <ccan/typesafe_cb/typesafe_cb.h>
#include <stdlib.h>
/* const args in callbacks should be OK. */
diff --git a/ccan/typesafe_cb/test/compile_ok-typesafe_cb-volatile.c b/ccan/typesafe_cb/test/compile_ok-typesafe_cb-volatile.c
index 93875c9e..bc87ae8d 100644
--- a/ccan/typesafe_cb/test/compile_ok-typesafe_cb-volatile.c
+++ b/ccan/typesafe_cb/test/compile_ok-typesafe_cb-volatile.c
@@ -1,4 +1,4 @@
-#include "typesafe_cb/typesafe_cb.h"
+#include <ccan/typesafe_cb/typesafe_cb.h>
#include <stdlib.h>
/* volatile args in callbacks should be OK. */
diff --git a/ccan/typesafe_cb/test/run.c b/ccan/typesafe_cb/test/run.c
index b04fae88..e01e71d5 100644
--- a/ccan/typesafe_cb/test/run.c
+++ b/ccan/typesafe_cb/test/run.c
@@ -1,6 +1,6 @@
-#include "typesafe_cb/typesafe_cb.h"
+#include <ccan/typesafe_cb/typesafe_cb.h>
#include <string.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
static char dummy = 0;
diff --git a/tools/Makefile b/tools/Makefile
index 8301ba52..4607d41a 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -1,4 +1,4 @@
-ALL_TOOLS = tools/ccan_depends tools/run_tests tools/doc_extract tools/namespacize tools/ccanlint/ccanlint
+ALL_TOOLS = tools/ccan_depends tools/doc_extract tools/namespacize tools/ccanlint/ccanlint
DEP_OBJS = tools/depends.o tools/compile.o tools/tools.o ccan/str_talloc/str_talloc.o ccan/grab_file/grab_file.o ccan/talloc/talloc.o ccan/noerr/noerr.o ccan/read_write_all/read_write_all.o
@@ -7,13 +7,11 @@ tools: $(ALL_TOOLS)
tools/ccan_depends: tools/ccan_depends.o $(DEP_OBJS)
-tools/run_tests: tools/run_tests.o ccan/tap/tap.o $(DEP_OBJS)
-
tools/doc_extract: tools/doc_extract.o tools/doc_extract-core.o $(DEP_OBJS)
tools/namespacize: tools/namespacize.o $(DEP_OBJS)
-tools/run_tests.o tools/namespacize.o tools/depends.o: tools/tools.h
+tools/namespacize.o tools/depends.o: tools/tools.h
tools-clean: ccanlint-clean
$(RM) $(ALL_TOOLS)
diff --git a/tools/run_tests.c b/tools/run_tests.c
deleted file mode 100644
index 5ba276fe..00000000
--- a/tools/run_tests.c
+++ /dev/null
@@ -1,249 +0,0 @@
-#include <err.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <assert.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include "ccan/tap/tap.h"
-#include "ccan/talloc/talloc.h"
-#include "ccan/str/str.h"
-#include "ccan/array_size/array_size.h"
-#include "tools.h"
-
-static struct test *tests = NULL;
-static struct obj *objs = NULL;
-static int verbose;
-
-struct test_type {
- const char *name;
- void (*buildfn)(const char *dir, struct test_type *t, const char *name,
- const char *apiobj, const char *libs);
- void (*runfn)(const char *name);
-};
-
-struct test {
- struct test *next;
- struct test_type *type;
- char *name;
-};
-
-struct obj {
- struct obj *next;
- bool generate;
- char *name;
-};
-
-static char *output_name(const char *name)
-{
- char *ret;
-
- assert(strends(name, ".c"));
-
- ret = talloc_strdup(name, name);
- ret[strlen(ret) - 2] = '\0';
- return ret;
-}
-
-static char *obj_list(const char *dir)
-{
- char *list = talloc_strdup(objs, "");
- struct obj *i;
-
- for (i = objs; i; i = i->next)
- list = talloc_asprintf_append(list, "%s ", i->name);
-
- /* FIXME */
- if (!streq(dir, "tap") && !strends(dir, "/tap"))
- list = talloc_asprintf_append(list, "ccan/tap/tap.o");
- return list;
-}
-
-static void compile_objs(void)
-{
- struct obj *i;
-
- for (i = objs; i; i = i->next) {
- char *cmd = talloc_asprintf(i, "gcc " CFLAGS " -o %s.o -c %s%s",
- output_name(i->name), i->name,
- verbose ? "" : "> /dev/null 2>&1");
- ok(system(cmd) == 0, "%s", cmd);
- }
-}
-
-static void cleanup_objs(void)
-{
- struct obj *i;
-
- for (i = objs; i; i = i->next) {
- if (!i->generate)
- continue;
- unlink(talloc_asprintf(i, "%s.o", output_name(i->name)));
- }
-}
-
-static void add_test(const char *testdir, const char *name, struct test_type *t)
-{
- struct test *test = talloc(testdir, struct test);
-
- test->next = tests;
- test->type = t;
- test->name = talloc_asprintf(test, "%s/%s", testdir, name);
- tests = test;
-}
-
-static void add_obj(const char *testdir, const char *name, bool generate)
-{
- struct obj *obj = talloc(testdir, struct obj);
-
- obj->next = objs;
- obj->name = talloc_asprintf(obj, "%s/%s", testdir, name);
- obj->generate = generate;
- objs = obj;
-}
-
-static int build(const char *dir, const char *name, const char *apiobj,
- const char *libs, int fail)
-{
- const char *cmd;
- int ret;
-
- cmd = talloc_asprintf(name, "gcc " CFLAGS " %s -o %s %s %s %s%s %s",
- fail ? "-DFAIL" : "",
- output_name(name), name, apiobj, obj_list(dir),
- libs, verbose ? "" : "> /dev/null 2>&1");
-
- if (verbose)
- fprintf(stderr, "Running %s\n", cmd);
-
- ret = system(cmd);
- if (ret == -1)
- diag("cmd '%s' failed to execute", cmd);
-
- return ret;
-}
-
-static void compile_ok(const char *dir, struct test_type *t, const char *name,
- const char *apiobj, const char *libs)
-{
- ok(build(dir, name, "", libs, 0) == 0, "%s %s", t->name, name);
-}
-
-/* api tests get the API obj linked in as well. */
-static void compile_api_ok(const char *dir, struct test_type *t,
- const char *name, const char *apiobj,
- const char *libs)
-{
- ok(build(dir, name, apiobj, libs, 0) == 0, "%s %s", t->name, name);
-}
-
-static void compile_fail(const char *dir, struct test_type *t, const char *name,
- const char *apiobj, const char *libs)
-{
- if (build(dir, name, "", libs, 0) != 0)
- fail("non-FAIL build %s", name);
- else
- ok(build(dir, name, "", libs, 1) > 0, "%s %s", t->name, name);
-}
-
-static void no_run(const char *name)
-{
-}
-
-static void run(const char *name)
-{
- if (system(output_name(name)) != 0)
- fail("running %s had error", name);
-}
-
-static void cleanup(const char *name)
-{
- unlink(output_name(name));
-}
-
-static struct test_type test_types[] = {
- { "compile_ok", compile_ok, no_run },
- { "compile_fail", compile_fail, no_run },
- { "run", compile_ok, run },
- { "api", compile_api_ok, run },
-};
-
-int main(int argc, char *argv[])
-{
- DIR *dir;
- struct dirent *d;
- char *testdir, *cwd;
- const char *apiobj = "";
- char *libs = talloc_strdup(NULL, "");
- struct test *test;
- unsigned int num_tests = 0, num_objs = 0, i;
-
- if (argc > 1 && streq(argv[1], "--verbose")) {
- verbose = 1;
- argc--;
- argv++;
- }
-
- while (argc > 1 && strstarts(argv[1], "--lib=")) {
- libs = talloc_asprintf_append(libs, " -l%s",
- argv[1] + strlen("--lib="));
- argc--;
- argv++;
- }
-
- if (argc > 1 && strstarts(argv[1], "--apiobj=")) {
- apiobj = argv[1] + strlen("--apiobj=");
- argc--;
- argv++;
- }
-
- if (argc < 2)
- errx(1, "Usage: run_tests [--verbose] [--apiobj=<obj>] <dir> [<extra-objs>...]");
-
- testdir = talloc_asprintf(NULL, "%s/test", argv[1]);
- dir = opendir(testdir);
- if (!dir)
- err(1, "Opening '%s'", testdir);
-
- while ((d = readdir(dir)) != NULL) {
- if (d->d_name[0] == '.' || !strends(d->d_name, ".c"))
- continue;
-
- for (i = 0; i < ARRAY_SIZE(test_types); i++) {
- if (strstarts(d->d_name, test_types[i].name)) {
- add_test(testdir, d->d_name, &test_types[i]);
- num_tests++;
- break;
- }
- }
- if (i == ARRAY_SIZE(test_types)) {
- add_obj(testdir, d->d_name, true);
- num_objs++;
- }
- }
-
- plan_tests(num_tests + num_objs + (num_objs ? 1 : 0));
- /* First all the extra object compilations. */
- compile_objs();
-
- /* Now add any object files from the command line */
- cwd = talloc_strdup(testdir, ".");
- for (i = 2; i < argc; i++)
- add_obj(cwd, argv[i], false);
-
- /* Do all the test compilations. */
- for (test = tests; test; test = test->next)
- test->type->buildfn(argv[1], test->type, test->name,
- apiobj, libs);
-
- cleanup_objs();
-
- /* Now run all the ones which wanted to run. */
- for (test = tests; test; test = test->next) {
- test->type->runfn(test->name);
- cleanup(test->name);
- }
-
- exit(exit_status());
-}
diff --git a/tools/tools.h b/tools/tools.h
index ed2f6bfb..5f5f119d 100644
--- a/tools/tools.h
+++ b/tools/tools.h
@@ -8,9 +8,8 @@
#define SPACE_CHARS " \f\n\r\t\v"
-/* FIXME: Remove some -I */
/* FIXME: Nested functions break with -Wmissing-prototypes -Wmissing-declarations */
-#define CFLAGS "-g -Wall -Wundef -Wstrict-prototypes -Wold-style-definition -Werror -Iccan/ -I. -I.. -I../.."
+#define CFLAGS "-g -Wall -Wundef -Wstrict-prototypes -Wold-style-definition -Werror -I../.."
/* This actually compiles and runs the info file to get dependencies. */
char **get_deps(const void *ctx, const char *dir, const char *name,