Skip to content

Commit

Permalink
Fix spurious failure when two tests try to remove ptf.log at the sa…
Browse files Browse the repository at this point in the history
…me time. (p4lang#4591)
  • Loading branch information
fruffy authored Apr 3, 2024
1 parent f203315 commit 7b62006
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backends/bmv2/run-bmv2-ptf-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,11 @@ def run_ptf(self, grpc_port: int, json_name: Path, info_name: Path) -> int:
# Add the tools PTF folder to the python path, it contains the base test.
pypath = ROOT_DIR.joinpath("tools/ptf")
# Show list of the tests
test_list_cmd = f"ptf --pypath {pypath} --test-dir {self.options.testdir} --list"
test_list_cmd = (
f"ptf --pypath {pypath} "
f"--log-file {self.options.testdir.joinpath('ptf.log')} "
f"--test-dir {self.options.testdir} --list"
)
returncode = self.bridge.ns_exec(test_list_cmd)
if returncode != testutils.SUCCESS:
return returncode
Expand Down

0 comments on commit 7b62006

Please sign in to comment.