From 77547edd5e6d85890c4679ed68c935c09d700ec9 Mon Sep 17 00:00:00 2001 From: Johan Date: Mon, 14 Mar 2022 16:03:08 +0100 Subject: [PATCH] Updated start function to handle know issue in main repo #776 --- contrib/p4-benchmark.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/contrib/p4-benchmark.py b/contrib/p4-benchmark.py index 77ffb5635..6feac19ce 100755 --- a/contrib/p4-benchmark.py +++ b/contrib/p4-benchmark.py @@ -25,10 +25,19 @@ def __init__(self): BenchExec.__init__(self) def load_executor(self): - from p4.p4execution import P4Execution + from p4_files.p4execution import P4Execution return P4Execution() + def start(self, argv): + """ + Make sure the test is not executed in container. Otherwise the application + wont be able to create new containers for the switches. + """ + if not "--no-container" in argv: + argv.append("--no-container") + return super().start(argv) + def main(benchexec=None, argv=None): """