-
Notifications
You must be signed in to change notification settings - Fork 1
New uic archive format #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -232,23 +232,7 @@ def __init__(self, ctxt: SessionContext): | |
| if not os.path.exists(uic_config_file_path): | ||
| raise FileNotFoundError | ||
|
|
||
| rust_platform: str | None = None | ||
| if platform.system() == 'Linux': | ||
| if platform.machine() == 'x86_64': # is amd64 on windows | ||
| rust_platform = "x86_64-unknown-linux-gnu" | ||
| elif platform.machine() == 'arm64': | ||
| rust_platform = "aarch64-unknown-linux-gnu" | ||
| elif platform.machine() == 'arm': | ||
| rust_platform = "armv7-unknown-linux-gnueabihf" | ||
| elif platform.system() == 'Darwin': | ||
| if platform.machine() == 'x86_64': | ||
| rust_platform = "x86_64-apple-darwin" | ||
| elif platform.machine() == 'arm64': | ||
| rust_platform = "aarch64-apple-darwin" | ||
| if rust_platform is None: | ||
| raise OSError(f"unsupported OS: {platform.system()}") | ||
|
|
||
| cmd_line = f'{ctxt.uic}/build/cargo/uic_upvl_build/{rust_platform}/debug/uic-upvl --conf {uic_config_file_path}' | ||
| cmd_line = f'{ctxt.uic}/uic-upvl --conf {uic_config_file_path}' | ||
| super().__init__(ctxt, 'upvl', cmd_line) | ||
|
|
||
|
|
||
|
|
@@ -313,23 +297,7 @@ def __init__(self, ctxt: SessionContext, devices_to_update: list[dict[str, str]] | |
| _logger.debug(f'uic-image-provider: images.json: {self.images_json}') | ||
| f.write(json.dumps(self.images_json)) | ||
|
|
||
| rust_platform: str | None = None | ||
| if platform.system() == 'Linux': | ||
| if platform.machine() == 'x86_64': # is amd64 on windows | ||
| rust_platform = "x86_64-unknown-linux-gnu" | ||
| elif platform.machine() == 'arm64': | ||
| rust_platform = "aarch64-unknown-linux-gnu" | ||
| elif platform.machine() == 'arm': | ||
| rust_platform = "armv7-unknown-linux-gnueabihf" | ||
| elif platform.system() == 'Darwin': | ||
| if platform.machine() == 'x86_64': | ||
| rust_platform = "x86_64-apple-darwin" | ||
| elif platform.machine() == 'arm64': | ||
| rust_platform = "aarch64-apple-darwin" | ||
| if rust_platform is None: | ||
| raise OSError(f"unsupported OS: {platform.system()}") | ||
|
|
||
| cmd_line = f'{ctxt.uic}/build/cargo/uic_image_provider_build/{rust_platform}/debug/uic-image-provider --conf {uic_config_file_path}' | ||
| cmd_line = f'{ctxt.uic}/uic-image-provider --conf {uic_config_file_path}' | ||
|
||
| super().__init__(ctxt,'image_provider', cmd_line) | ||
|
|
||
|
|
||
|
|
@@ -351,7 +319,7 @@ def __init__(self, ctxt: SessionContext, region: str, tty_path: str, update_file | |
| protocol_pref='2,1' if 'LR' in region else '1,2' | ||
| )) | ||
|
|
||
| cmd_line = f'{ctxt.uic}/build/applications/zpc/zpc --conf {uic_config_file_path}' | ||
| cmd_line = f'{ctxt.uic}/zpc --conf {uic_config_file_path}' | ||
|
||
| if update_file is not None: | ||
| sapi_ver_regex = r"\[zpc_ncp_update\] chip_serial_api_version: (?P<sapiver>(7.\d{1,3}.\d{1,3}))" | ||
| self.patterns = { | ||
|
|
@@ -394,7 +362,7 @@ def _generate_uic_configuration_file(self, ctxt: SessionContext, region: str, lo | |
| f"# Unify configuration file (autogenerated on: {datetime.now()})\n" | ||
| f"log:\n" | ||
| f" level: '{log_level}'\n" | ||
| f"mapdir: '{ctxt.uic}/build/applications/zpc/components/dotdot_mapper/rules'\n" | ||
| f"mapdir: '{ctxt.uic}/rules'\n" | ||
| f"zpc:\n" | ||
| f" inclusion_protocol_preference: '{protocol_pref}'\n" | ||
| f" normal_tx_power_dbm: {tx_power}\n" | ||
|
|
@@ -403,7 +371,7 @@ def _generate_uic_configuration_file(self, ctxt: SessionContext, region: str, lo | |
| f" serial_log_file: '{ctxt.current_test_logdir}/sapi.log'\n" | ||
| f" datastore_file: '{ctxt.current_test_logdir}/zpc.db'\n" | ||
| f" poll:\n" | ||
| f" attribute_list_file: '{ctxt.uic}/applications/zpc/components/zpc_rust/zwave_poll_config.yaml'\n" | ||
| f" attribute_list_file: '{ctxt.uic}/zwave_poll_config.yaml'\n" | ||
| f" ota:\n" | ||
| f" cache_path: '{ctxt.current_test_logdir}/zpc_ota_cache'\n" | ||
| # maybe append this in the relevant processes instead ? | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of platform detection logic assumes that the new archive format will have platform-appropriate executables at the root level. Consider adding validation to ensure the executable exists and is executable before attempting to run it, or document this assumption clearly.