From 2c4a000e36a58276c62e63aa6a4147e4e43875cc Mon Sep 17 00:00:00 2001 From: Naveen Joy Date: Wed, 23 Apr 2025 10:32:08 -0700 Subject: [PATCH] tests: add an argument to select the vpp binary in run.py Type: test Change-Id: I5ec3a54e6f7661e2b742910b1f1fb1f5d4a28a36 Signed-off-by: Naveen Joy --- test/run.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/test/run.py b/test/run.py index 2e7e9c47adb..489d86bb4d8 100644 --- a/test/run.py +++ b/test/run.py @@ -71,9 +71,7 @@ def get_env(args): "VENV_PATH": str(ws_root / "build-root" / "test" / "venv"), "VPP_BUILD_DIR": str(ws_root / "build-root" / "build-vpp-native" / "vpp"), "VPP_INSTALL_PATH": str(ws_root / "build-root" / "install-vpp-native"), - "VPP_BIN": str( - ws_root / "build-root" / "install-vpp-native" / "vpp" / "bin" / "vpp" - ), + "VPP_BIN": args.vpp_binary, "VPP_PLUGIN_PATH": str( ws_root / "build-root" @@ -221,6 +219,7 @@ def run_tests_in_venv(env): f"--venv-dir={env['VENV_PATH']}", f"--vpp-ws-dir={env['WS_ROOT']}", f"--vpp-tag={env['TAG']}", + f"--vpp={env['VPP_BIN']}", f"--failed-dir={env['FAILED_DIR']}", f"--verbose={env['V']}", f"--jobs={env['TEST_JOBS']}", @@ -328,6 +327,17 @@ if __name__ == "__main__": "Default: /var/run/vpp if VPP is started as the root user, else " "/var/run/user/${uid}/vpp.", ) + parser.add_argument( + "--vpp-binary", + dest="vpp_binary", + required=False, + action="store", + default=str( + ws_root / "build-root" / "install-vpp-native" / "vpp" / "bin" / "vpp" + ), + help=f"Path to VPP Binary." + f"Default: {ws_root}/build-root/install-vpp-native/vpp/bin/vpp", + ) parser.add_argument( "-e", "--extended", -- 2.16.6