Skip to content

Commit 44f63a3

Browse files
committed
build: fix race where channeld_fakenet doesn't depend on external modules.
Because it wasn't in ALL_OBJS. Copy the Makefile pattern! ``` Submodule 'src/secp256k1' (https://github.com/ElementsProject/secp256k1-zkp.git) registered for path 'external/libwally-core/src/secp256k1' Cloning into '/home/runner/work/lightning/lightning/external/libwally-core/src/secp256k1'... cc tests/plugins/channeld_fakenet.c In file included from ./bitcoin/script.h:4, from tests/plugins/channeld_fakenet.c:14: ./bitcoin/signature.h:6:10: fatal error: secp256k1.h: No such file or directory 6 | #include <secp256k1.h> | ^~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:301: tests/plugins/channeld_fakenet.o] Error 1 make: *** Waiting for unfinished jobs.... Submodule path 'external/libwally-core/src/secp256k1': checked out ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent 4f4bf77 commit 44f63a3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/plugins/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ PLUGIN_TESTSELFDISABLE_AFTER_GETMANIFEST_OBJS := $(PLUGIN_TESTSELFDISABLE_AFTER_
1010

1111
tests/plugins/test_selfdisable_after_getmanifest: bitcoin/chainparams.o $(PLUGIN_TESTSELFDISABLE_AFTER_GETMANIFEST_OBJS) common/autodata.o common/json_parse_simple.o common/setup.o common/utils.o $(JSMN_OBJS)
1212

13+
PLUGIN_CHANNELD_FAKENET_SRC := tests/plugins/channeld_fakenet.c
14+
PLUGIN_CHANNELD_FAKENET_OBJS := $(PLUGIN_CHANNELD_FAKENET_SRC:.c=.o)
15+
1316
tests/plugins/channeld_fakenet: \
14-
tests/plugins/channeld_fakenet.o \
17+
$(PLUGIN_CHANNELD_FAKENET_OBJS) \
1518
channeld/channeld_wiregen.o \
1619
channeld/commit_tx.o \
1720
bitcoin/block.o \
@@ -96,4 +99,4 @@ tests/plugins/channeld_fakenet: \
9699

97100
# Make sure these depend on everything.
98101
ALL_TEST_PROGRAMS += tests/plugins/test_libplugin tests/plugins/test_selfdisable_after_getmanifest tests/plugins/channeld_fakenet
99-
ALL_C_SOURCES += $(PLUGIN_TESTLIBPLUGIN_SRC) $(PLUGIN_TESTSELFDISABLE_AFTER_GETMANIFEST_SRC) $(PLUGIN_CHANNELD_FAKENET)
102+
ALL_C_SOURCES += $(PLUGIN_TESTLIBPLUGIN_SRC) $(PLUGIN_TESTSELFDISABLE_AFTER_GETMANIFEST_SRC) $(PLUGIN_CHANNELD_FAKENET_SRC)

0 commit comments

Comments
 (0)