Skip to content

Commit

Permalink
Auto increase port number in lldb validation script (#2492)
Browse files Browse the repository at this point in the history
  • Loading branch information
xujuntwt95329 authored Aug 22, 2023
1 parent 2b30bb0 commit 377c3d7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ci/validate_lldb.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

options = parser.parse_args()

lldb_command_prologue = f'{options.lldb} -o "process connect -p wasm connect://127.0.0.1:{options.port}"'
lldb_command_epilogue = '-o q'

test_cases = {
Expand Down Expand Up @@ -64,8 +63,13 @@ def print_process_output(p):
print("Failed to get process output")

# Step2: Launch WAMR in debug mode and validate lldb commands
wamr_cmd = f'{options.wamr} -g=127.0.0.1:{options.port} {WASM_OUT_FILE}'

iteration = 0
for case, cmd in test_cases.items():
lldb_command_prologue = f'{options.lldb} -o "process connect -p wasm connect://127.0.0.1:{int(options.port) + iteration}"'
wamr_cmd = f'{options.wamr} -g=127.0.0.1:{int(options.port) + iteration} {WASM_OUT_FILE}'
iteration += 1

has_error = False
print(f'validating case [{case}] ...', end='', flush=True)
lldb_cmd = f'{lldb_command_prologue} {cmd} {lldb_command_epilogue}'
Expand Down

0 comments on commit 377c3d7

Please sign in to comment.