Skip to content

Commit

Permalink
GH-1125 Create unique files for nodeos logs to avoid overwriting exis…
Browse files Browse the repository at this point in the history
…ting logs.
  • Loading branch information
heifner committed Jan 28, 2025
1 parent fbbc3e2 commit 71a0511
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/TestHarness/Node.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,11 @@ def launchCmd(self, cmd: List[str], data_dir: Path, launch_time: str):
err = dd / Path(f'stderr.{launch_time}.txt')
pidf = dd / Path(f'{Utils.EosServerName}.pid')

i = 0
while err.is_file():
i = i + 1
err = dd / Path(f'stderr.{launch_time}-{i}.txt')

Utils.Print(f'spawning child: {" ".join(cmd)}')
dd.mkdir(parents=True, exist_ok=True)
with out.open('w') as sout, err.open('w') as serr:
Expand Down

0 comments on commit 71a0511

Please sign in to comment.