Commit 64dedc47 authored by Vadim Kochan's avatar Vadim Kochan Committed by Stephen Hemminger

tests: Run each test in network namespace

Changed to forcely running each test in network
namespace to do not affect on current network setup.
Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
parent f043759d
## -- Config -- ## -- Config --
DEV := lo DEV := lo
PREFIX := sudo -E PREFIX := sudo -E unshare -n
RESULTS_DIR := results RESULTS_DIR := results
## -- End Config -- ## -- End Config --
HAVE_UNSHARED_UTIL := $(shell unshare --version 2> /dev/null)
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2)) rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
TESTS := $(patsubst tests/%,%,$(call rwildcard,tests/,*.t)) TESTS := $(patsubst tests/%,%,$(call rwildcard,tests/,*.t))
...@@ -38,6 +40,9 @@ distclean: clean ...@@ -38,6 +40,9 @@ distclean: clean
echo "Entering iproute2" && cd iproute2 && $(MAKE) distclean && cd ..; echo "Entering iproute2" && cd iproute2 && $(MAKE) distclean && cd ..;
$(TESTS): clean $(TESTS): clean
ifeq (,$(HAVE_UNSHARED_UTIL))
$(error Please install util-linux tools to run tests in separated network namespace)
endif
@mkdir -p $(RESULTS_DIR) @mkdir -p $(RESULTS_DIR)
@for d in $(TESTS_DIR); do \ @for d in $(TESTS_DIR); do \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment