mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 07:34:21 +01:00
tools/test: fix very confused code.
This broke with COPTFLAGS="-flto -O3", and so I took a look (it complains more than normal because main isn't there). We should never be running update-mocks except on programs expected to compile: in this case, that's tools/test/run-test-wire.c. Remove the code which tries to run this, which also means non-developers won't be running update-mocks! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
2ac775f9f4
commit
2c3d4e46fc
@@ -33,19 +33,14 @@ TOOL_TEST_COMMON_OBJS := \
|
||||
TOOLS_WIRE_DEPS := $(BOLT_DEPS) tools/test/test_cases $(wildcard tools/gen/*_template)
|
||||
|
||||
$(TOOL_TEST_OBJS) $(TOOL_GEN_OBJS): $(TOOL_GEN_HEADER)
|
||||
$(TOOL_TEST_PROGRAMS): $(TOOL_TEST_COMMON_OBJS) $(TOOL_GEN_SRC:.c=.o) tools/test/enum.o
|
||||
$(TOOL_TEST_PROGRAMS): $(TOOL_TEST_COMMON_OBJS) $(TOOL_GEN_OBJS) tools/test/enum.o
|
||||
|
||||
tools/test/test_gen.h: $(TOOLS_WIRE_DEPS) tools/test/Makefile
|
||||
$(BOLT_GEN) --page header $@ test_type < tools/test/test_cases > $@
|
||||
|
||||
.INTERMEDIATE: tools/test/test_gen.c.tmp.c
|
||||
# Parallel make sometimes tries to use file before update-mocks, so split.
|
||||
tools/test/test_gen.c.tmp.c: $(TOOLS_WIRE_DEPS)
|
||||
tools/test/test_gen.c: $(TOOLS_WIRE_DEPS) tools/test/Makefile
|
||||
$(BOLT_GEN) --page impl tools/test/test_gen.h test_type < tools/test/test_cases > $@
|
||||
|
||||
tools/test/test_gen.c: tools/test/test_gen.c.tmp.c $(EXTERNAL_HEADERS) tools/test/test_gen.h $(CCAN_HEADERS)
|
||||
@MAKE=$(MAKE) tools/update-mocks.sh "$<" $(SUPPRESS_OUTPUT) && mv "$<" "$@"
|
||||
|
||||
tools/test/print_gen.h: wire/onion$(EXP)_wiregen.h $(TOOLS_WIRE_DEPS)
|
||||
$(BOLT_GEN) -P --page header $@ test_type < tools/test/test_cases > $@
|
||||
|
||||
|
||||
Reference in New Issue
Block a user