From 5569a85a1efd1bb3dd1cfa8ad78d3b3d3db2beec Mon Sep 17 00:00:00 2001 From: Naveen Joy Date: Mon, 17 Oct 2022 15:07:49 -0700 Subject: tests: enable extended test runs in run.py Change-Id: I5f712614910dc69f04c43efd8958ef8e87906b9e Type: test Signed-off-by: Naveen Joy --- test/run.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/run.py b/test/run.py index ddb79950b85..58112fd790c 100755 --- a/test/run.py +++ b/test/run.py @@ -283,6 +283,7 @@ def run_tests_in_venv( log_dir, socket_dir="", running_vpp=False, + extended=False, ): """Runs tests in the virtual environment set by venv_dir. @@ -292,6 +293,7 @@ def run_tests_in_venv( log_dir: Directory location for storing log files socket_dir: Use running VPP's socket files running_vpp: True if tests are run against a running VPP + extended: Run extended tests """ script = os.path.join(test_dir, "scripts", "run.sh") args = [ @@ -305,6 +307,8 @@ def run_tests_in_venv( ] if running_vpp: args = args + [f"--use-running-vpp"] + if extended: + args = args + [f"--extended"] print(f"Running script: {script} " f"{' '.join(args)}") process_args = [script] + args call(process_args) @@ -409,6 +413,15 @@ if __name__ == "__main__": "Default: /var/run/vpp if VPP is started as the root user, else " "/var/run/user/${uid}/vpp.", ) + parser.add_argument( + "-e", + "--extended", + dest="extended", + required=False, + action="store_true", + default=False, + help="Run extended tests.", + ) args = parser.parse_args() vm_tests = False # Enable VM tests @@ -436,6 +449,7 @@ if __name__ == "__main__": log_dir=args.log_dir, socket_dir=args.socket_dir, running_vpp=args.running_vpp, + extended=args.extended, ) # Run tests against a VPP inside a VM else: -- cgit 1.2.3-korg