]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Setting up the netlab tests to run from the main Makefile mq-master-netlab-submodule
authorMaria Matejka <mq@ucw.cz>
Wed, 15 Jun 2022 15:36:54 +0000 (17:36 +0200)
committerMaria Matejka <mq@ucw.cz>
Wed, 15 Jun 2022 18:07:17 +0000 (20:07 +0200)
The bird-tools repository must be initialized as a submodule if the
tests should run. If it is checked out, `make test` runs them. If not,
then not.

.gitmodules [new file with mode: 0644]
Makefile.in
bird-tools [new submodule]

diff --git a/.gitmodules b/.gitmodules
new file mode 100644 (file)
index 0000000..0a0b8b5
--- /dev/null
@@ -0,0 +1,3 @@
+[submodule "bird-tools"]
+       path = bird-tools
+       url = https://gitlab.nic.cz/labs/bird-tools
index e0ff4a1d45e8e3ed5605343bf5e13b1b81529544..6e5cf86d53ce481c9c470b0f19a045cfffab29b6 100644 (file)
@@ -84,6 +84,7 @@ cf-local = $(conf-y-targets): $(s)config.Y
 
 src-o-files = $(patsubst %.c,$(o)%.o,$(src))
 tests-target-files = $(patsubst %.c,$(o)%,$(tests_src))
+tests_targets_ok := 
 
 all-daemon = $(daemon): $(obj)
 all-client = $(client): $(obj)
@@ -167,7 +168,7 @@ $(objdir)/sysdep/paths.h: Makefile
 
 # Unit tests rules
 
-tests_targets_ok = $(addsuffix .ok,$(tests_targets))
+tests_targets_ok += $(addsuffix .ok,$(tests_targets))
 
 $(tests_targets): %: %.o $(tests_objs) | prepare
        $(E)echo LD $(LDFLAGS) -o $@ $< "..." $(LIBS)
@@ -179,6 +180,9 @@ $(tests_targets): LIBS += $(DAEMON_LIBS)
 $(tests_targets_ok): %.ok: %
        $(Q)$* 2>/dev/null && touch $*.ok
 
+# Include the netlab testsuite target listing
+-include bird-tools/netlab/runtests.mk
+
 test: testsclean check
 check: tests tests_run
 tests: $(tests_targets)
diff --git a/bird-tools b/bird-tools
new file mode 160000 (submodule)
index 0000000..94362b2
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 94362b27e7fad080f6262aa26c532ee42343af69