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): """