summaryrefslogtreecommitdiffstats
path: root/test/config.py
diff options
context:
space:
mode:
authorNaveen Joy <najoy@cisco.com>2022-08-30 13:59:03 -0700
committerDamjan Marion <dmarion@0xa5.net>2022-09-20 13:54:58 +0000
commitc872cec3f0b31f7baf36dd50d75c285f0d0f4bec (patch)
treec57da9cbc4b3a08c2b3cab7e2b1bb374c7e2964c /test/config.py
parent229f5fcf188cf710f4a8fb269d92f1a1d04a99da (diff)
tests: run tests against a running VPP
Usage: test/run.py -r -t {test_filter} Instead of starting a new instance of VPP, when the -r argument is provided, test is run against a running VPP instance. Optionally, one can also set the VPP socket directory using the -d argument. The default location for socket files is /var/run/user/${uid}/vpp and /var/run/vpp if VPP is started as root. Type: improvement Change-Id: I05e57a067fcb90fb49973f8159fc17925b741f1a Signed-off-by: Naveen Joy <najoy@cisco.com>
Diffstat (limited to 'test/config.py')
-rw-r--r--test/config.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/config.py b/test/config.py
index b8bbbbcde7c..e73555723ff 100644
--- a/test/config.py
+++ b/test/config.py
@@ -359,6 +359,29 @@ parser.add_argument(
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()
ws = config.vpp_ws_dir