X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fconfig.py;h=d2f14c82e190f455a6f0fe950bed7b494cc2e0fe;hb=5616041aedf5e12da536aa4a8ffa8d3fe2270b88;hp=c99d1ca66a629866112b0071db8ab27efcc4c77e;hpb=d9b0c6fbf7aa5bd9af84264105b39c82028a4a29;p=vpp.git diff --git a/test/config.py b/test/config.py index c99d1ca66a6..d2f14c82e19 100644 --- a/test/config.py +++ b/test/config.py @@ -1,7 +1,6 @@ import argparse import os import psutil -import textwrap import time @@ -119,7 +118,7 @@ parser.add_argument( "--failed-dir", action="store", type=directory, - help="directory containing failed tests", + help="directory containing failed tests (default: --tmp-dir)", ) filter_help_string = """\ @@ -302,6 +301,14 @@ parser.add_argument( help="directory containing external plugins", ) +parser.add_argument( + "--extern-apidir", + action="append", + type=directory, + default=[], + help="directory to look for API JSON files", +) + parser.add_argument( "--coredump-size", action="store", @@ -357,8 +364,30 @@ parser.add_argument( "--keep-pcaps", action="store_true", default=default_keep_pcaps, - help="if set, keep all pcap files from a test run" - f" (default: {default_keep_pcaps})", + help=f"if set, keep all pcap files from a test run (default: {default_keep_pcaps})", +) + +parser.add_argument( + "-r", + "--use-running-vpp", + dest="running_vpp", + required=False, + action="store_true", + default=False, + help="Runs tests against a running VPP.", +) + +parser.add_argument( + "-d", + "--socket-dir", + dest="socket_dir", + required=False, + action="store", + default="", + help="Relative or absolute path to running VPP's socket directory.\n" + "The directory must contain VPP's socket files:api.sock & stats.sock.\n" + "Default: /var/run/vpp if VPP is started as the root user, else " + "/var/run/user/${uid}/vpp.", ) config = parser.parse_args() @@ -397,7 +426,10 @@ config.test_src_dir = test_dirs if config.venv_dir is None: - config.venv_dir = f"{ws}/test/venv" + config.venv_dir = f"{ws}/build-root/test/venv" + +if config.failed_dir is None: + config.failed_dir = f"{config.tmp_dir}" available_cpus = psutil.Process().cpu_affinity() num_cpus = len(available_cpus)