diff options
author | Annie Tallund <annie.tallund@arm.com> | 2023-01-31 16:20:12 +0100 |
---|---|---|
committer | Annie Tallund <annie.tallund@arm.com> | 2023-02-10 12:54:45 +0100 |
commit | b863f8eaf0b2e2627fa9c5d2a51004fd8133cc68 (patch) | |
tree | 6ac932f81de1d326477f0716b1668e9bebae332e /tests | |
parent | 3e3dcb9bd5abb88adcd85b4f89e8a81e7f6fa293 (diff) | |
download | mlia-b863f8eaf0b2e2627fa9c5d2a51004fd8133cc68.tar.gz |
MLIA-594 Save target profile configuration
Save the target profile file in the output directory.
Change-Id: I886e52cb922c5425e749b154bd67a5d294ce0201
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_target_config.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_target_config.py b/tests/test_target_config.py index 26f524e..c6235a5 100644 --- a/tests/test_target_config.py +++ b/tests/test_target_config.py @@ -3,12 +3,15 @@ """Tests for the backend config module.""" from __future__ import annotations +from pathlib import Path + import pytest from mlia.backend.config import BackendConfiguration from mlia.backend.config import BackendType from mlia.backend.config import System from mlia.core.common import AdviceCategory +from mlia.target.config import copy_profile_file_to_output_dir from mlia.target.config import get_builtin_supported_profile_names from mlia.target.config import get_profile_file from mlia.target.config import load_profile @@ -17,6 +20,15 @@ from mlia.target.config import TargetProfile from mlia.utils.registry import Registry +def test_copy_profile_file_to_output_dir(tmp_path: Path) -> None: + """Test if the profile file is copied into the output directory.""" + test_target_profile_name = "ethos-u55-128" + test_file_path = Path(f"{tmp_path}/{test_target_profile_name}.toml") + + copy_profile_file_to_output_dir(test_target_profile_name, tmp_path) + assert Path.is_file(test_file_path) + + def test_get_builtin_supported_profile_names() -> None: """Test profile names getter.""" assert get_builtin_supported_profile_names() == [ |