diff options
author | Benjamin Klimczak <benjamin.klimczak@arm.com> | 2024-03-21 17:33:17 +0000 |
---|---|---|
committer | Benjamin Klimczak <benjamin.klimczak@arm.com> | 2024-03-22 10:06:28 +0000 |
commit | c7ee5b783f044d7ff641773aa385840f5ff944cc (patch) | |
tree | 297f308978b00282d8ebd3a1f71e1ae5e678a767 /src/mlia/backend/corstone/install.py | |
parent | 508281df31dc3c18f2e007f4dd505160342a681a (diff) | |
download | mlia-c7ee5b783f044d7ff641773aa385840f5ff944cc.tar.gz |
refactor: Backend dependencies and more
- Add backend dependencies: One backend can now depend on another
backend.
- Re-factor 'DownloadArtifact':
- Rename 'DownloadArtifact' to 'DownloadConfig'
- Remove attributes 'name' and 'version' not relevant for downloads
- Add helper properties:
- 'filename' parses the URL to extract the file name from the end
- 'headers' calls the function to generate a HTML header for the
download
- Add OutputLogger helper class
- Re-factor handling of backend configurations in the target profiles.
Change-Id: Ifda6cf12c375d0c1747d7e4130a0370d22c3d33a
Signed-off-by: Benjamin Klimczak <benjamin.klimczak@arm.com>
Diffstat (limited to 'src/mlia/backend/corstone/install.py')
-rw-r--r-- | src/mlia/backend/corstone/install.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mlia/backend/corstone/install.py b/src/mlia/backend/corstone/install.py index 5f11d5b..5c18334 100644 --- a/src/mlia/backend/corstone/install.py +++ b/src/mlia/backend/corstone/install.py @@ -19,7 +19,7 @@ from mlia.backend.install import CompoundPathChecker from mlia.backend.install import Installation from mlia.backend.install import PackagePathChecker from mlia.backend.install import StaticPathChecker -from mlia.utils.download import DownloadArtifact +from mlia.utils.download import DownloadConfig from mlia.utils.filesystem import working_directory @@ -159,8 +159,6 @@ def get_corstone_installation(corstone_name: str) -> Installation: archive = corstone_fvp.archive sha256_hash = corstone_fvp.sha256_hash url = ARM_ECOSYSTEM_FVP_URL + archive - filename = archive.split("/")[-1] - version = corstone_fvp.get_fvp_version() expected_files_fvp = corstone_fvp.fvp_expected_files expected_files_vht = corstone_fvp.get_vht_expected_files() backend_subfolder = expected_files_fvp[0].split("FVP")[0] @@ -169,11 +167,8 @@ def get_corstone_installation(corstone_name: str) -> Installation: name=corstone_name, description=corstone_name.capitalize() + " FVP", fvp_dir_name=corstone_name.replace("-", "_"), - download_artifact=DownloadArtifact( - name=corstone_name.capitalize() + " FVP", + download_config=DownloadConfig( url=url, - filename=filename, - version=version, sha256_hash=sha256_hash, ), supported_platforms=["Linux"], |