Remove old run-tests, clean up #includes to all be <ccan/...
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 6 Jan 2010 00:23:58 +0000 (10:53 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 6 Jan 2010 00:23:58 +0000 (10:53 +1030)
60 files changed:
ccan/alignof/test/run.c
ccan/alloc/test/run-testsize.c
ccan/alloc/test/run.c
ccan/antithread/test/run-lock.c
ccan/antithread/test/run-simple.c
ccan/antithread/test/run-spawn-NULL.c
ccan/antithread/test/run-spawn.c
ccan/antithread/test/run-tell.c
ccan/antithread/test/run-tell_parent.c
ccan/array/test/run.c
ccan/array_size/test/compile_fail.c
ccan/array_size/test/run.c
ccan/block_pool/test/run.c
ccan/build_assert/test/compile_fail-expr.c
ccan/build_assert/test/compile_fail.c
ccan/build_assert/test/compile_ok.c
ccan/build_assert/test/run-EXPR_BUILD_ASSERT.c
ccan/ccan_tokenizer/test/run-simple-token.c
ccan/ccan_tokenizer/test/run.c
ccan/check_type/test/compile_fail-check_type.c
ccan/check_type/test/compile_fail-check_type_unsigned.c
ccan/check_type/test/compile_fail-check_types_match.c
ccan/check_type/test/run.c
ccan/ciniparser/ciniparser.c
ccan/ciniparser/test/run.c
ccan/crc/test/api.c
ccan/endian/test/run.c
ccan/grab_file/test/run-grab.c
ccan/hash/test/api-hash_stable.c
ccan/hash/test/run.c
ccan/ilog/test/run.c
ccan/isaac/test/run.c
ccan/isaac/test/run64.c
ccan/list/test/compile_ok-constant.c
ccan/list/test/run.c
ccan/md4/test/api.c
ccan/noerr/test/run.c
ccan/read_write_all/test/run-read_all.c
ccan/read_write_all/test/run-write_all.c
ccan/short_types/test/run.c
ccan/str/test/run.c
ccan/str_talloc/test/run.c
ccan/stringmap/stringmap.c
ccan/stringmap/test/run.c
ccan/talloc/test/compile_fail-talloc_set.c
ccan/talloc/test/run-external-alloc.c
ccan/talloc/test/run-talloc_set.c
ccan/talloc/test/run.c
ccan/talloc_link/test/run.c
ccan/typesafe_cb/test/compile_fail-cast_if_type.c
ccan/typesafe_cb/test/compile_fail-typesafe_cb-int.c
ccan/typesafe_cb/test/compile_fail-typesafe_cb.c
ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c
ccan/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c
ccan/typesafe_cb/test/compile_ok-typesafe_cb-const.c
ccan/typesafe_cb/test/compile_ok-typesafe_cb-volatile.c
ccan/typesafe_cb/test/run.c
tools/Makefile
tools/run_tests.c [deleted file]
tools/tools.h

index f76fb6691c73c9692cb1a767723b0f9a63e33a72..2da69032a49c210670f43683f5b9f4f309abd54e 100644 (file)
@@ -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
index 9071cb6d348951c44b5656d442751a32aa7aa839..2f0b772a4a3ba2a6c3f379b7b55581a51c810f63 100644 (file)
@@ -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>
index 8247122eaa4041b8ebf643d2e5077605019f64ce..801db5762443da6840f733928ba3a82dbb75e65c 100644 (file)
@@ -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>
 
index b486e0a2906e0003fd461c1eada5519a8c27c975..712d3e1de04cbda2a9a7a99686b34ce188ad0516 100644 (file)
@@ -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
 
index 947dbe024a198e0a31c8d2f295fd3211074bcc2a..56569bb24b646615ad278c85fe855cf8858a7e9e 100644 (file)
@@ -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)
 {
index 7b1b5a2cbc541bc79969d9d7678e255dee977aeb..5b633546ba495a1cf3cd688e68debf68ae26a71a 100644 (file)
@@ -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[])
 {
index 1f12ebeba41904758df575c098d7d4041beacc53..b8aa81e5d707aafa421c3934a447e3d3b506270c 100644 (file)
@@ -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[])
 {
index fc42095c724f3126a7dcabb670ae41e9f13ac5f8..84ca492815289339fec66e937adab4f0c7a69ae1 100644 (file)
@@ -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)
 {
index f3c17e9aee3a10eb65f5fdc985d25a1d4e05120d..d215a6709d88e796ad576aabd4107643e9b718f3 100644 (file)
@@ -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)
 {
index b0b672ba5c8ebee0b217de8099035d14ca8fc5b6..91096727c1fd276b53ea3db62a59be694a4b150d 100644 (file)
@@ -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"
index 9f9ac6507d9fdf6b5039b23a9744df44b0995fe0..37d315f2198c59c083cdc81c3c1e057538a123bd 100644 (file)
@@ -1,4 +1,4 @@
-#include "array_size/array_size.h"
+#include <ccan/array_size/array_size.h>
 
 int main(int argc, char *argv[8])
 {
index 3a3cdcc0bb76421f53ef48a3b91c2fed9c19c445..37b4200b44f363340616da82e20ce2df44388d25 100644 (file)
@@ -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];
index 3fa7effd1e333eeb69675f5a60b5ccc9b376dbf1..f70a8026daf897abc86b2a19cb21ecb7f043896e 100644 (file)
@@ -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;
index 41cdc0f844e1ad1f5c3bc40689461e78dd2f3ed6..fa60d6899a7e5b162134af8fd7a0ef1a4e08c7c3 100644 (file)
@@ -1,4 +1,4 @@
-#include "build_assert/build_assert.h"
+#include <ccan/build_assert/build_assert.h>
 
 int main(int argc, char *argv[])
 {
index a6867db5956f278d9001e18535421361579c32a8..37d95eddc9b8d979476a3a921e86e793c7a1dfa7 100644 (file)
@@ -1,4 +1,4 @@
-#include "build_assert/build_assert.h"
+#include <ccan/build_assert/build_assert.h>
 
 int main(int argc, char *argv[])
 {
index bc5541f5c7d9b106a30f149031ef40e120ce2eaa..4105484d1fe35f113a83e32474ad1a57db50c8c8 100644 (file)
@@ -1,4 +1,4 @@
-#include "build_assert/build_assert.h"
+#include <ccan/build_assert/build_assert.h>
 
 int main(int argc, char *argv[])
 {
index 7fd0c49f9ffc813a519e39c10f94bd9f380621d1..91bbbbbf75faaa9e638b23011d715cb712f37773 100644 (file)
@@ -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[])
 {
index 071848f9fdd0246382e36dc37cc2ca7467d6d0b7..efc394309c562c7d4524147b662482a65fd8e221 100644 (file)
@@ -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'
index 9a4ae19ba9ce587ced48631c14011dbef6628f1b..631518aa49b8219aae273b5f6bad8ea8519c5e7f 100644 (file)
         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>
 
index d19fe86f9a78306851e8e84586cbd819319c6d49..fe7d6a235c33011040bfe9648e98916c69418ce4 100644 (file)
@@ -1,4 +1,4 @@
-#include "check_type/check_type.h"
+#include <ccan/check_type/check_type.h>
 
 int main(int argc, char *argv[])
 {
index 6b18acb5670acd3a793b81ce668493815cf3ce81..574d4aeb2402cf3f5ac6d0e7c3a1fe11a3e3de79 100644 (file)
@@ -1,4 +1,4 @@
-#include "check_type/check_type.h"
+#include <ccan/check_type/check_type.h>
 
 int main(int argc, char *argv[])
 {
index bc1f9c31f9154d675e49934b0b38549655877c9d..cbd6e9bc5b45fd79739b8bdebd9b3a68c5b3dca3 100644 (file)
@@ -1,4 +1,4 @@
-#include "check_type/check_type.h"
+#include <ccan/check_type/check_type.h>
 
 int main(int argc, char *argv[])
 {
index f4b33c1616a1b5bc38fc66fee496b374831186fe..83b903c0b1b33314b3cefae512299de9f59986bb 100644 (file)
@@ -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[])
 {
index dceb22f55f7d10f55de10c4dcaadbf36f59ec224..d801b736eede829592734fdf4076890205406f34 100644 (file)
@@ -33,7 +33,7 @@
  */
 
 #include <ctype.h>
-#include "ciniparser.h"
+#include <ccan/ccan/ciniparser.h>
 
 #define ASCIILINESZ      (1024)
 #define INI_INVALID_KEY  ((char*) NULL)
index 34ad13f475b5faab1131e0ccbbe2f076da6f127e..5fe67b467010aee2655532ca13e4b1c1312d62b7 100644 (file)
@@ -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
 
index 5e85e35bde9aa516d4e1c01ef9f4003fd2b13455..1d56e3d2969000616212585e2b52d3407c188173 100644 (file)
@@ -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[] = {
index 2cd258613de4fe1e6665b024a0807d0a2fe0fab5..cba96f0b4d68dcd7e14844edf2a1d566a1ed943e 100644 (file)
@@ -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[])
 {
index 3c44ce055c498e2041209484ad930a7356a2e836..b3c18e5a4db20369c42096c00734b1e4ce098a9c 100644 (file)
@@ -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[])
index 37cd0736d12981b5705457b09b541a4d6db0bbbd..d07c4a933ad76970ed566b5709869d663598deb8 100644 (file)
@@ -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>
 
index 1857739af5931f7044d2b0a4195ffb3ba1e333a3..2aeec42d94a06f7543ec1560323a67d902ed4649 100644 (file)
@@ -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>
 
index 2aeee1ce763a1cf9db59646a8c35f8eaad982cca..ce19293aefc1b27d138b72827adf4e40256fff00 100644 (file)
@@ -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.*/
 
index 8e953bbf031bcb16f17948e0a3c4dddd487ec5d8..81a46bc2ce8fc245469b8ba90ef897052b852b53 100644 (file)
@@ -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]={
index cac186e15ae1653f2ac4d6a8d349d20ba095c5cb..db2b4d350e5b5d61eb5fed8e95615f0eaf416ee3 100644 (file)
@@ -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]={
index edb3cb011b5fab1f84a3d4eb7bab407906b9cd3c..c57cdadc316769a410a9bf43c61bf204209c891e 100644 (file)
@@ -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>
 
index ac318e1a7fe484c75b072feeb7c5ac96bfca297c..1a5f093470da87e13912f0ac4ee26bcf83a0e0d2 100644 (file)
@@ -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;
index 339409c04686145a7e0299db8d5b319c63595d41..a21833c9cde3aaa63f040761b2de5bcfd1608f4a 100644 (file)
@@ -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>
 
index 6f1361ce4d851929196c5c404de17bee91e2354a..144e4dd0871025b4ef6834fc01545e8889b985f8 100644 (file)
@@ -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>
index 5fa0ec392920d119af1b2d963238cf4b188ea109..ee6a980032beba1776cfb9e8752437e19bbd1faa 100644 (file)
@@ -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>
index ab21cd31575f72c56d0ae7df658f5d04acdf7fdc..50bd729c78d7590d3d362ec9a7d39e41a10254e0 100644 (file)
@@ -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>
index a78d56cead2623270f746c51a7aa2d6725df9c4d..5aa80d7f5155590c69cc57b99e4847ac4eeebfac 100644 (file)
@@ -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>
 
index b55444a15b595f25250d9de4172187d9fbea675a..f35d75d6ea4dc53e8ccb01349dbd519ef6b32739 100644 (file)
@@ -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]))
index 2e45aafe2c2a51e30f115af39a0610f865417249..4e1c3d168dcdd475994fb83b251a54c1b9662562 100644 (file)
@@ -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]))
index b3ca57afe1b8a892d67d62743f804b591209bb30..364e2a4881519b2d2af1f89dd3dedb6dd08d8ceb 100644 (file)
@@ -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
 
index 0d4db56734c19c14f48feff643187d90ba8d7421..2ffcb1242493b79ffabb2008729b17fa7dbc3b7f 100644 (file)
@@ -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);
index 909076b7065fc1db456aabf863fdc9f873eabda9..cc9a1755928acbaabf9a5a60eb4dd9f0eb9d23be 100644 (file)
@@ -1,4 +1,4 @@
-#include "talloc/talloc.c"
+#include <ccan/talloc/talloc.c>
 
 int main(void)
 {
index 70f3dacda5588f0fe6f1fddf9f2893675f5558dc..013041feb9159de1741ea1f28a6a51877a1bb1d4 100644 (file)
@@ -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 */
index d7b49614881dd578db8ee81810e1f04c8d77a17e..18b9066f32c9290b5f9e47617edeefa2606ec229 100644 (file)
@@ -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)
index ad70a51ec77761059470347acbbdaa4cbf5d3e37..9654f625322fae32e44c1654088965e097e357f9 100644 (file)
@@ -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",             \
index e095bd9eb04549eec1e586df1291539a13bdb852..3cbb5f01e1839c7dc3085d9f41b0655f2655959a 100644 (file)
@@ -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>
 
index 1e417cbac6bb869b43693087fe827380389d1cf8..db2f1249257a9e0a2bc0224054f5ef9b1ccc9d65 100644 (file)
@@ -1,4 +1,4 @@
-#include "typesafe_cb/typesafe_cb.h"
+#include <ccan/typesafe_cb/typesafe_cb.h>
 
 void _set_some_value(void *val);
 
index 54d0e7bac3a36094303555d699775590d39e6eb7..c4033364d41c91bf565bfc52d71b22ab3434cc21 100644 (file)
@@ -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);
index d305d5fb1101fc1c3a242346f97a5218fd166744..bd20131368cf35dd2bc636d9f0d2bf44f3bd0557 100644 (file)
@@ -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)
index 099eb25755559e1c26fd3d807c265d7bf7f55071..885a3c551c171123d42301e760e95489a297d95f 100644 (file)
@@ -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)
index 38daec51063fb718964d59abb08dd658c76b1139..c7dc6f1e380b7ca71affd6db60dcd0ce9803c58c 100644 (file)
@@ -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)
index fe3a34171b1e0b3f8ad6c9dc02c869c67912eaaf..f8d0ae0f60a6f7466326cf24042b3db639e9fb2a 100644 (file)
@@ -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. */
index 93875c9e5d784dcb490227d7ae49f2f3e676d11c..bc87ae8d8ad74856d1878adcb96f3eca9644bc63 100644 (file)
@@ -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. */
index b04fae883c2e5c659496739dea75950da7e67b8f..e01e71d552a68bfa4e2f8d1f2157fe72e426e229 100644 (file)
@@ -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;
 
index 8301ba52abab595f0d6e2d0db188e9e49d6e2f6f..4607d41ac9f42c318e70a1d173247ac632520892 100644 (file)
@@ -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 (file)
index 5ba276f..0000000
+++ /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());
-}
index ed2f6bfb6e77442e9682f450d34db6b2cce6e93e..5f5f119dfaa6d20e8ed5b46fe990681be9edacdd 100644 (file)
@@ -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,