aboutsummaryrefslogtreecommitdiff
path: root/tests/test_backend_install.py
diff options
context:
space:
mode:
authorAnnie Tallund <annie.tallund@arm.com>2023-01-12 07:49:06 +0100
committerBenjamin Klimczak <benjamin.klimczak@arm.com>2023-02-08 15:23:29 +0000
commit836efd40317a397761ec8b66e3f4398faac43ad0 (patch)
tree5133ffd51d8d6772551333a4b337d36a501a8a91 /tests/test_backend_install.py
parenta4fb8c72f15146c95df16c25e75f03344e9814fd (diff)
downloadmlia-836efd40317a397761ec8b66e3f4398faac43ad0.tar.gz
MLIA-770 List all available backends
- Rely on target and backend registry for support information - Make above information less Ethos(TM)-U specific Change-Id: I8dbfb84401016412a3d719a84eb592f21d79c46b
Diffstat (limited to 'tests/test_backend_install.py')
-rw-r--r--tests/test_backend_install.py51
1 files changed, 10 insertions, 41 deletions
diff --git a/tests/test_backend_install.py b/tests/test_backend_install.py
index 024a833..c3efe09 100644
--- a/tests/test_backend_install.py
+++ b/tests/test_backend_install.py
@@ -1,4 +1,4 @@
-# SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates.
+# SPDX-FileCopyrightText: Copyright 2022-2023, Arm Limited and/or its affiliates.
# SPDX-License-Identifier: Apache-2.0
"""Tests for common management functionality."""
from __future__ import annotations
@@ -9,11 +9,9 @@ import pytest
from mlia.backend.install import BackendInfo
from mlia.backend.install import get_all_application_names
-from mlia.backend.install import get_all_system_names
-from mlia.backend.install import get_system_name
-from mlia.backend.install import is_supported
from mlia.backend.install import StaticPathChecker
-from mlia.backend.install import supported_backends
+from mlia.backend.registry import get_supported_backends
+from mlia.target.registry import is_supported
@pytest.mark.parametrize(
@@ -49,7 +47,13 @@ def test_static_path_checker_invalid_path(tmp_path: Path) -> None:
def test_supported_backends() -> None:
"""Test function supported backends."""
- assert supported_backends() == ["Corstone-300", "Corstone-310"]
+ assert get_supported_backends() == [
+ "ArmNNTFLiteDelegate",
+ "Corstone-300",
+ "Corstone-310",
+ "TOSA-Checker",
+ "Vela",
+ ]
@pytest.mark.parametrize(
@@ -71,30 +75,6 @@ def test_is_supported(backend: str, expected_result: bool) -> None:
[
"Corstone-300",
[
- "Corstone-300: Cortex-M55+Ethos-U55",
- "Corstone-300: Cortex-M55+Ethos-U65",
- ],
- ],
- [
- "Corstone-310",
- [
- "Corstone-310: Cortex-M85+Ethos-U55",
- "Corstone-310: Cortex-M85+Ethos-U65",
- ],
- ],
- ],
-)
-def test_get_all_system_names(backend: str, expected_result: list[str]) -> None:
- """Test function get_all_system_names."""
- assert sorted(get_all_system_names(backend)) == expected_result
-
-
-@pytest.mark.parametrize(
- "backend, expected_result",
- [
- [
- "Corstone-300",
- [
"Generic Inference Runner: Ethos-U55",
"Generic Inference Runner: Ethos-U65",
],
@@ -111,14 +91,3 @@ def test_get_all_system_names(backend: str, expected_result: list[str]) -> None:
def test_get_all_application_names(backend: str, expected_result: list[str]) -> None:
"""Test function get_all_application_names."""
assert sorted(get_all_application_names(backend)) == expected_result
-
-
-def test_get_system_name() -> None:
- """Test function get_system_name."""
- assert (
- get_system_name("Corstone-300", "ethos-u55")
- == "Corstone-300: Cortex-M55+Ethos-U55"
- )
-
- with pytest.raises(KeyError):
- get_system_name("some_backend", "some_type")