tests: enable extended test runs in run.py
Change-Id: I5f712614910dc69f04c43efd8958ef8e87906b9e Type: test Signed-off-by: Naveen Joy <najoy@cisco.com>
This commit is contained in:
14
test/run.py
14
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:
|
||||
|
Reference in New Issue
Block a user