Passing e.g. -j4 in TESTSUITEFLAGS runs 4 tests in parallel, which speeds
up the testsuite.
---
 debian/rules |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/debian/rules b/debian/rules
index bbc7357..de79800 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,9 +14,11 @@
 BUILD_NUMBER = 0
 
 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-MAKEFLAGS += -j$(NUMJOBS)
+PARALLEL = -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+else
+PARALLEL =
 endif
+MAKEFLAGS += $(PARALLEL)
 
 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
 CFLAGS += -O0
@@ -45,7 +47,8 @@ build-arch: build-arch-stamp
 build-arch-stamp: configure-stamp 
        $(MAKE) -C _debian
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-       if $(MAKE) -C _debian check; then :; else \
+       if $(MAKE) -C _debian check TESTSUITEFLAGS='$(PARALLEL)'; then :; \
+       else \
                cat _debian/tests/testsuite.log; \
                exit 1; \
        fi
-- 
1.7.1

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to