Skip to content

Commit

Permalink
chore: e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sangjanai committed Jan 13, 2025
1 parent 9269e82 commit cdd6499
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions engine/e2e-test/test_cli_engine_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ def setup_and_teardown(self):
# Teardown
stop_server()

@pytest.mark.skipif(platform.system() != "Windows", reason="Windows-specific test")
@pytest.mark.skipif(reason="Ignore tensorrt-llm test")
def test_engines_get_tensorrt_llm_should_not_be_incompatible(self):
exit_code, output, error = run("Get engine", ["engines", "get", "tensorrt-llm"])
assert exit_code == 0, f"Get engine failed with error: {error}"
assert (
"Incompatible" not in output
), "tensorrt-llm should be Ready or Not Installed on Windows"

@pytest.mark.skipif(platform.system() != "Windows", reason="Windows-specific test")
@pytest.mark.skipif(reason="Ignore onnx-runtime test")
def test_engines_get_onnx_should_not_be_incompatible(self):
exit_code, output, error = run("Get engine", ["engines", "get", "onnxruntime"])
assert exit_code == 0, f"Get engine failed with error: {error}"
Expand All @@ -41,23 +41,23 @@ def test_engines_get_llamacpp_should_not_be_incompatible(self):
"Incompatible" not in output
), "llama-cpp should be compatible for Windows, MacOs and Linux"

@pytest.mark.skipif(platform.system() != "Darwin", reason="macOS-specific test")
@pytest.mark.skipif(reason="Ignore tensorrt-llm test")
def test_engines_get_tensorrt_llm_should_be_incompatible_on_macos(self):
exit_code, output, error = run("Get engine", ["engines", "get", "tensorrt-llm"])
assert exit_code == 0, f"Get engine failed with error: {error}"
assert (
"is not supported on" in output
), "tensorrt-llm should be Incompatible on MacOS"

@pytest.mark.skipif(platform.system() != "Darwin", reason="macOS-specific test")
@pytest.mark.skipif(reason="Ignore onnx-runtime test")
def test_engines_get_onnx_should_be_incompatible_on_macos(self):
exit_code, output, error = run("Get engine", ["engines", "get", "onnxruntime"])
assert exit_code == 0, f"Get engine failed with error: {error}"
assert (
"is not supported on" in output
), "onnxruntime should be Incompatible on MacOS"

@pytest.mark.skipif(platform.system() != "Linux", reason="Linux-specific test")
@pytest.mark.skipif(reason="Ignore onnx-runtime test")
def test_engines_get_onnx_should_be_incompatible_on_linux(self):
exit_code, output, error = run("Get engine", ["engines", "get", "onnxruntime"])
print(output)
Expand Down
4 changes: 2 additions & 2 deletions engine/e2e-test/test_cli_engine_install_nightly.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ def test_engines_install_llamacpp_should_be_successfully(self):
assert len(response.json()) > 0
assert exit_code == 0, f"Install engine failed with error: {error}"

@pytest.mark.skipif(platform.system() != "Darwin", reason="macOS-specific test")
@pytest.mark.skipif(reason="Ignore onnx-runtime test")
def test_engines_install_onnx_on_macos_should_be_failed(self):
exit_code, output, error = run(
"Install Engine", ["engines", "install", "onnxruntime"]
)
assert "is not supported on" in output, "Should display error message"
assert exit_code == 0, f"Install engine failed with error: {error}"

@pytest.mark.skipif(platform.system() != "Darwin", reason="macOS-specific test")
@pytest.mark.skipif(reason="Ignore tensorrt-llm test")
def test_engines_install_onnx_on_tensorrt_should_be_failed(self):
exit_code, output, error = run(
"Install Engine", ["engines", "install", "tensorrt-llm"]
Expand Down

0 comments on commit cdd6499

Please sign in to comment.