[dm-devel] [PATCH 2/7] multipath-tools Makefiles: allow building test programs only

mwilck at suse.com mwilck at suse.com
Fri Mar 26 21:29:39 UTC 2021


From: Martin Wilck <mwilck at suse.com>

"make test" builds and runs test programs. For multiarch / cross-compilation
environments, it's useful to be able to separate these steps.

Signed-off-by: Martin Wilck <mwilck at suse.com>
---
 Makefile       | 7 +++++--
 tests/Makefile | 1 +
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index bddb2bf..c5bedcf 100644
--- a/Makefile
+++ b/Makefile
@@ -51,8 +51,11 @@ clean: $(BUILDDIRS.clean)
 install: $(BUILDDIRS:=.install)
 uninstall: $(BUILDDIRS:=.uninstall)
 
-test:	all
-	$(MAKE) -C tests
+test-progs:	all
+	$(MAKE) -C tests progs
+
+test:	test-progs
+	$(MAKE) -C tests all
 
 valgrind-test:	all
 	$(MAKE) -C tests valgrind
diff --git a/tests/Makefile b/tests/Makefile
index 11ca1be..e70c8ed 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -20,6 +20,7 @@ HELPERS := test-lib.o test-log.o
 .PRECIOUS: $(TESTS:%=%-test)
 
 all:	$(TESTS:%=%.out)
+progs:	$(TESTS:%=%-test) lib/libchecktur.so
 valgrind:	$(TESTS:%=%.vgr)
 
 # test-specific compiler flags
-- 
2.30.1





More information about the dm-devel mailing list