Skip to content

Commit

Permalink
p
Browse files Browse the repository at this point in the history
Signed-off-by: kevin <[email protected]>
  • Loading branch information
khluu committed Sep 20, 2024
1 parent 9d755ee commit 1023d07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scripts/pipeline_generator/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def get_agent_queue(no_gpu: Optional[bool], gpu_type: Optional[str], num_gpus: O
def get_full_test_command(test_commands: List[str], step_working_dir: str) -> str:
"""Convert test commands into one-line command with the right directory."""
working_dir = step_working_dir or DEFAULT_WORKING_DIR
test_commands_str = "; ".join(test_commands)
return f"cd {working_dir}; {test_commands_str}"
test_commands_str = ";\n".join(test_commands)
return f"cd {working_dir};\n{test_commands_str}"


def get_multi_node_test_command(
Expand Down
6 changes: 3 additions & 3 deletions scripts/tests/pipeline_generator/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def test_get_agent_queue(no_gpu: bool, gpu_type: str, num_gpus: int, expected_re
@pytest.mark.parametrize(
("test_commands", "step_working_dir", "expected_result"),
[
(["echo 'hello'"], None, "cd /vllm-workspace/tests; echo 'hello'"),
(["echo 'hello'"], "/vllm-workspace/tests", "cd /vllm-workspace/tests; echo 'hello'"),
(["echo 'hello1'", "echo 'hello2'"], None, "cd /vllm-workspace/tests; echo 'hello1'; echo 'hello2'"),
(["echo 'hello'"], None, "cd /vllm-workspace/tests;\necho 'hello'"),
(["echo 'hello'"], "/vllm-workspace/tests", "cd /vllm-workspace/tests;\necho 'hello'"),
(["echo 'hello1'", "echo 'hello2'"], None, "cd /vllm-workspace/tests;\necho 'hello1';\necho 'hello2'"),
],
)
def test_get_full_test_command(test_commands: List[str], step_working_dir: str, expected_result: str):
Expand Down

0 comments on commit 1023d07

Please sign in to comment.