aboutsummaryrefslogtreecommitdiffstats
path: root/test/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/config.py')
-rw-r--r--test/config.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/config.py b/test/config.py
index 578cc40fa2a..5d2ef1dab4f 100644
--- a/test/config.py
+++ b/test/config.py
@@ -2,6 +2,7 @@ import argparse
import os
import psutil
import time
+from vpp_qemu_utils import can_create_namespaces
def positive_int_or_default(default):
@@ -191,6 +192,11 @@ parser.add_argument(
)
parser.add_argument("--extended", action="store_true", help="run extended tests")
+parser.add_argument(
+ "--skip-netns-tests",
+ action="store_true",
+ help="skip tests involving netns operations",
+)
parser.add_argument(
"--sanity", action="store_true", help="perform sanity vpp run before running tests"
@@ -444,6 +450,10 @@ elif config.max_vpp_cpus > 0:
else:
max_vpp_cpus = num_cpus
+if not config.skip_netns_tests:
+ if not can_create_namespaces():
+ config.skip_netns_tests = True
+
if __name__ == "__main__":
print("Provided arguments:")
for i in config.__dict__: