Skip to content

Commit

Permalink
Again try run spawn instead of test during warmup
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilsa committed May 20, 2024
1 parent 6491515 commit 5cc86ee
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion zombienet/docker/test_runner.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
import subprocess
import sys

def run_test(container_name, test_command):
def run_test(container_name, test_command, first_attempt=False):
command = f"docker exec {container_name} sh -c 'zombienet-linux-x64 test -p native {test_command}'"
if (first_attempt):
# Split the test_command into a list of words
words = command.split()

# Replace 'test' with 'spawn' in the list
words = ['spawn' if word == 'test' else word for word in words]

# Replace '.zndsl' with '.toml' in the last word
words[-1] = words[-1].replace('.zndsl', '.toml')

# Join the list back into a string
command = ' '.join(words)
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

while True:
Expand Down

0 comments on commit 5cc86ee

Please sign in to comment.