Commit 8f61c0bc authored by Rusty Russell's avatar Rusty Russell

Move ccanlint tests into subdirectories.

parent 15290c3f
OBJS := tools/ccanlint/has_info.o \
tools/ccanlint/has_main_header.o \
tools/ccanlint/has_tests.o \
tools/ccanlint/trailing_whitespace.o \
tools/ccanlint/idempotent.o \
tools/ccanlint/has_info_documentation.o \
TEST_CFILES := $(wildcard tools/ccanlint/compulsory_tests/*.c) \
$(wildcard tools/ccanlint/tests/*.c)
TEST_OBJS := $(TEST_CFILES:.c=.o)
FUTURE:=tools/ccanlint/if_have_not_ifdef.o \
tools/ccanlint/needs_depends.o \
tools/ccanlint/has_info_documentation.o \
tools/ccanlint/has_header_documentation.o \
tools/ccanlint/has_tests.o \
tools/ccanlint/builds_ok.o \
tools/ccanlint/builds_ok_all_have_variants.o \
tools/ccanlint/run_tests.o \
tools/ccanlint/test_coverage.o \
CORE_OBJS := tools/ccanlint/ccanlint.o \
tools/ccanlint/file_analysis.o \
tools/doc_extract-core.o \
ccan/str_talloc/str_talloc.o ccan/grab_file/grab_file.o \
ccan/talloc/talloc.o ccan/noerr/noerr.o
OBJS := $(CORE_OBJS) $(TEST_OBJS)
tools/ccanlint/generated-init-tests: $(OBJS)
cat $(OBJS:.o=.c) | sed -n 's/^struct ccanlint \([A-Za-z0-9_]*\) = {/{ extern struct ccanlint \1; list_add(\&tests, \&\1.list); }/p' >$@
tools/ccanlint/ccanlint.o: tools/ccanlint/generated-init-tests
tools/ccanlint/ccanlint: \
$(OBJS) \
tools/ccanlint/ccanlint.o \
tools/ccanlint/file_analysis.o \
tools/doc_extract-core.o \
ccan/str_talloc/str_talloc.o ccan/grab_file/grab_file.o \
ccan/talloc/talloc.o ccan/noerr/noerr.o
tools/ccanlint/ccanlint: $(OBJS)
ccanlint-clean:
$(RM) tools/ccanlint/generated-init-tests
......
#include "ccanlint.h"
#include <tools/ccanlint/ccanlint.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
......
#include "ccanlint.h"
#include <tools/ccanlint/ccanlint.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
......
#include "ccanlint.h"
#include <tools/ccanlint/ccanlint.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
......
#include "ccanlint.h"
#include "../doc_extract.h"
#include <tools/ccanlint/ccanlint.h>
#include <tools/doc_extract.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
......
#include "ccanlint.h"
#include <tools/ccanlint/ccanlint.h>
#include <tools/tools.h>
#include <ccan/talloc/talloc.h>
#include <ccan/str/str.h>
#include <sys/types.h>
......@@ -12,7 +13,6 @@
#include <err.h>
#include <string.h>
#include <ctype.h>
#include "../tools.h"
static const char explain[]
= "Headers usually start with the C preprocessor lines to prevent multiple\n"
......
/* Trailing whitespace test. Almost embarrassing, but trivial. */
#include "ccanlint.h"
#include <tools/ccanlint/ccanlint.h>
#include <ccan/talloc/talloc.h>
#include <ccan/str/str.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment